tf.train.export_meta_graph
tf.train.export_meta_graph
tf.train.export_meta_graph
export_meta_graph( filename=None, meta_info_def=None, graph_def=None, saver_def=None, collection_list=None, as_text=False, graph=None, export_scope=None, clear_devices=False, **kwargs )
Defined in tensorflow/python/training/saver.py
.
See the guide: Variables > Exporting and Importing Meta Graphs
Returns MetaGraphDef
proto. Optionally writes it to filename.
This function exports the graph, saver, and collection objects into MetaGraphDef
protocol buffer with the intention of it being imported at a later time or location to restart training, run inference, or be a subgraph.
Args:
-
filename
: Optional filename including the path for writing the generatedMetaGraphDef
protocol buffer. -
meta_info_def
:MetaInfoDef
protocol buffer. -
graph_def
:GraphDef
protocol buffer. -
saver_def
:SaverDef
protocol buffer. -
collection_list
: List of string keys to collect. -
as_text
: IfTrue
, writes theMetaGraphDef
as an ASCII proto. -
graph
: TheGraph
to import into. IfNone
, use the default graph. -
export_scope
: Optionalstring
. Name scope under which to extract the subgraph. The scope name will be striped from the node definitions for easy import later into new name scopes. IfNone
, the whole graph is exported. graph_def and export_scope cannot both be specified. -
clear_devices
: Whether or not to clear the device field for anOperation
orTensor
during export. **kwargs: Optional keyed arguments.
Returns:
A MetaGraphDef
proto.
Raises:
-
ValueError
: When theGraphDef
is larger than 2GB.
© 2017 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/api_docs/python/tf/train/export_meta_graph