In Chapter 4, Transforming Pictures with Amazing Art Styles, and Chapter 5, Understanding Simple Speech Commands, we used two slightly different versions of a script called freeze.py to merge trained network weights with the network graph definition to a self-sufficient model file, a boon we can use on mobile devices. TensorFlow also comes with a more universal version of the freeze script, called freeze_graph.py, located in the tensorflow/python/tools folder, that you can use to build a model file. To make it work, you need to provide it with at least four parameters (to see all the available parameters, check out tensorflow/python/tools/freeze_graph.py):
- --input_graph or --input_meta_graph: a graph definition ...