tf.compat.v1.train.export_meta_graph

View source on GitHub

Returns MetaGraphDef proto.

tf.compat.v1.train.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, clear_extraneous_savers=False, strip_default_attrs=False,
    save_debug_info=False, **kwargs
)

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:

Returns:

A MetaGraphDef proto.

Raises:

Eager Compatibility

Exporting/importing meta graphs is not supported unless both graph_def and graph are provided. No graph exists when eager execution is enabled.