Reputation: 21353
The inception net in the Android Tensorflow Demo stores the model as a protobuf file (tensorflow_inception_graph.pb). I'd like to replace this network with another one.
Is there documentation or an example somewhere on how to convert a trained TensorFlow network in Python to .pb
? I'm aware of TensorFlow's Saver but this seems to be used to save intermediate training state. Not sure how it works if the model is already trained.
Upvotes: 9
Views: 3663
Reputation: 81
tf.Graph.as_graph_def()
retrieves the serialized graph. Then you just write it to a file.
Upvotes: 4