Convert Tensorflow Learning Model to protobuf

The initial network in Android Tensorflow Demo stores the model as a protobuf file ( tensorflow_inception_graph.pb ). I would like to replace this network with another.

Is there any documentation or an example somewhere on how to convert a trained TensorFlow network in Python to .pb ? I know TensorFlow Saver , but it seems to be used to maintain the state of intermediate learning. You do not know how this works if the model is already trained.

+8
python android tensorflow
source share
2 answers

tf.Graph.as_graph_def() retrieves the serialized graph. Then you just write it to a file.

+4
source share

Here is an example of saving and loading

+5
source share

All Articles