I cannot successfully run the optimize_for_inference
module on a simple, saved TensorFlow graph (Python 2.7; package installed by pip install tensorflow-gpu==
input
is a graphdef file for the script not the data part of the checkpoint. You need to freeze the model to a .pb
file/ or get the prototxt for graph and use the optimize for inference script. This script takes either a frozen binary GraphDef file (where the weight
variables have been converted into constants by the freeze_graph script), or a
text GraphDef proto file (the weight variables are stored in a separate
checkpoint file), and outputs a new GraphDef with the optimizations applied.