I\'m attempting to export a model built and trained with Keras to a protobuffer that I can load in a C++ script (as in this example). I\'ve generated a .pb file containing t
So, I got it working. Sort of.
By using tensorflow.python.client.graph_util.convert_variables_to_constants
directly instead of first saving GraphDef
and a checkpoint to disk and then using the freeze_graph
tool/script, I have been able to save a GraphDef
containing both graph definition and variables converted to constants.
EDIT
mrry updated his answer, which solved my issue of freeze_graph not working, but I'll leave this answer as well, in case anyone else could find it useful.