Created
April 4, 2018 18:37
-
-
Save campoy/0ec529c9b7da21138ae949dcc6b00701 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
modelBytes, _ := assets.Asset("model.pb") | |
graph := tf.NewGraph() | |
graph.Import(modelBytes, "") | |
input := graph.Operation("input").Output(0) | |
output := graph.Operation("output").Output(0) | |
sess, _ := tf.NewSession(graph, &tf.SessionOptions{}) | |
feed, _ := tf.NewTensor([][]float32{}) | |
result, _ := sess.Run( | |
map[tf.Output]*tf.Tensor{input: input1}, | |
[]tf.Output{output}, nil) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment