diff options
author | A. Unique TensorFlower <gardener@tensorflow.org> | 2018-01-02 18:19:21 -0800 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-01-02 18:28:12 -0800 |
commit | da1588ccf5c62eccac8013673359ac15b43eb394 (patch) | |
tree | ca08b5eee9e81362aacdd15874cee00f2fb34ca8 /tensorflow/core/protobuf/meta_graph.proto | |
parent | a8041609f182db130953e123d7be4823ea13d05e (diff) |
meta_graph export: Add support to strip default valued attributes.
Following APIs now accept an additional argument (`strip_default_attrs`) to
enable/disable (default:disabled) stripping of default valued attributes in a NodeDef:
o meta_graph: export_meta_graph, create_meta_graph.
o saver: Saver.save, Saver.export_meta_graph.
o builder: SavedModelBuilder.add_meta_graph,
SavedModelBuilder.add_meta_graph_and_variables.
o estimator: Estimator.export_savedmodel.
Related changes:
o Pywrap C++ AreAttrValuesEqual to compare two AttrValue instances.
This allows for a single/canonical way of comparing AttrValues in C++/Python.
o Add a utility method to meta_graph.py to get the node def by name in a graph def.
o Update SavedModelBuilder documentation on relevance of strip_default_attrs flag.
PiperOrigin-RevId: 180619001
Diffstat (limited to 'tensorflow/core/protobuf/meta_graph.proto')
-rw-r--r-- | tensorflow/core/protobuf/meta_graph.proto | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tensorflow/core/protobuf/meta_graph.proto b/tensorflow/core/protobuf/meta_graph.proto index 47ec2aa1ef..fd86c0da12 100644 --- a/tensorflow/core/protobuf/meta_graph.proto +++ b/tensorflow/core/protobuf/meta_graph.proto @@ -61,6 +61,10 @@ message MetaGraphDef { // graph. This will be populated by the framework, which will overwrite any // user supplied value. string tensorflow_git_version = 6; + + // A flag to denote whether default-valued attrs have been stripped from + // the nodes in this graph_def. + bool stripped_default_attrs = 7; } MetaInfoDef meta_info_def = 1; |