You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: