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

Models exported as graphdef protos for Tensorflow cannot be trained. #447

Open
abhigyan7 opened this issue Nov 11, 2018 · 0 comments · May be fixed by #455
Open

Models exported as graphdef protos for Tensorflow cannot be trained. #447

abhigyan7 opened this issue Nov 11, 2018 · 0 comments · May be fixed by #455

Comments

@abhigyan7
Copy link
Contributor

When graphdefs are imported using tf.import_graph_def(), variable collections within tensorflow such as GLOBAL_VARIABLES and TRAINABLE_VARIABLES are not updated. Since tensorflow optimizers look for variables to optimize in the above collections by default, calling tf.train.Optimizer.minimize() fails with an error saying that there are no variables to be optimized.

This strangely seems to be an issue only with graphdefs extracted from the keras backend session and not a problem with Fabrik.

A better way would be to export metagraphdefs, which contain the graphdef along with information about variable collections, which are restored when the metagraphdef is imported. Exporting models for tensorflow as .meta files can be done with very little change in the export logic as it is now.

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

Successfully merging a pull request may close this issue.

1 participant