Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to freeze graph #84

Open
zjbaby opened this issue Aug 31, 2018 · 3 comments
Open

how to freeze graph #84

zjbaby opened this issue Aug 31, 2018 · 3 comments

Comments

@zjbaby
Copy link

zjbaby commented Aug 31, 2018

@eldar & @andreas-eberle
Hi, I try to freeze your model by the following code:
restorer = tf.train.Saver()
sess = tf.Session()
sess.run(tf.global_variables_initializer())
sess.run(tf.local_variables_initializer())

##restore variables from disk ckpt file.
restorer.restore(sess, "model/mpii/mpii-single-resnet-101")
#write graph
tf.train.write_graph(sess.graph_def, './', 'graph_unfreeze.pb', as_text=True)

#freeze graph
freeze_graph.freeze_graph('./graph_unfreeze.pb', '', False, "model/mpii/mpii-single-resnet-101", 'pose/part_pred/block4/BiasAdd,pose/locref_pred/block4/BiasAdd', None, None, './frozen_graph.pb', False, "")

The "frozen_graph.pb" file is generated successfully. But when I use the "frozen_graph.pb" file to estimatie body part, the result is wrong, and I don't know why.

Can you help me to export the graph?
Thank you very much~~

@czhang0528
Copy link

Can you show the debug msg?

@user2326
Copy link

user2326 commented Mar 1, 2019

@zjbaby How did you know the output nodes ('pose/part_pred/block4/BiasAdd,pose/locref_pred/block4/BiasAdd) ??
I am trying to convert the model to onnx but unable to convert as a conversion tool is not getting the output node recognized. Please assist.

@AndriiTsok
Copy link

@zjbaby Did you manage to freeze it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants