Open caijimin opened 6 years ago
output_graph = "frozen_model.pb"
output_graph_def = tf.graph_util.convert_variables_to_constants(
sess, # The session is used to retrieve the weights
tf.get_default_graph().as_graph_def(), # The graph_def is used to retrieve the nodes
["feature_fusion/Conv_7/Sigmoid", "feature_fusion/concat_3"]
)
with tf.gfile.GFile(output_graph, "wb") as f:
f.write(output_graph_def.SerializeToString())
Insert this code in here(https://github.com/argman/EAST/blob/master/eval.py#L148)
@argman I froze the graph this way and tried to load and test it. The frozen graph is giving really bad predictions. Is there a better way to freeze the graph , I saw some issues where they suggested to include MovingAverage
params as well.
Any help appreciated. Thanks!
@argman I froze the graph this way and tried to load and test it. The frozen graph is giving really bad predictions. Is there a better way to freeze the graph , I saw some issues where they suggested to include
MovingAverage
params as well.Any help appreciated. Thanks!
Hi I have the same problem, did you find any solution?
Thanks very much for your tensorflow re-implementation of EAST. I want to freeze the graph with the checkpoint using freeze_graph.py, and I don't know the exact name of --output_node_names.
I tried "feature_fusion/Conv_7/Sigmoid" and it fails, could any kindly tell me? python tensorflow/python/tools/freeze_graph.py --input_meta_graph=model.ckpt-49491.meta --input_checkpoint=model.ckpt-49491 --output_graph=model_frozen.pb --input_binary=true --output_node_names="feature_fusion/Conv_7/Sigmoid"
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/graph_util_impl.py", line 133, in _assert_nodes_are_present assert d in name_to_node, "%s is not in graph" % d AssertionError: feature_fusion/Conv_7/Sigmoid is not in graph
Thanks, Jimin