"frame_name" attr must be altered when importing/exporting MetaGraphDefs.
authorSkye Wanderman-Milne <skyewm@google.com>
Mon, 5 Feb 2018 23:49:57 +0000 (15:49 -0800)
committerTensorFlower Gardener <gardener@tensorflow.org>
Mon, 5 Feb 2018 23:55:28 +0000 (15:55 -0800)
commit8fe70dc41f269b266b2adce7bed96b3833dda60e
tree24040b0af2013a1224962ac9e7119c907ffc48a9
parent5476489053f0523b8aebab05bc39a02c089300e0
"frame_name" attr must be altered when importing/exporting MetaGraphDefs.

The frame_name attr of Enter operations must be the name of the
associated WhileLoopContext, otherwise taking the gradient of the loop
will result in frame errors.

I'm not happy that the export logic is in meta_graph.py (all other
control flow de/serialization is in control_flow_ops.py). However, I
can't think of how else to do it, since only export_scoped_meta_graph
has access to the NodeDefs being exported.

PiperOrigin-RevId: 184599323
tensorflow/python/framework/meta_graph.py
tensorflow/python/framework/meta_graph_test.py
tensorflow/python/ops/control_flow_ops.py