tf.graph_util.import_graph_def

View source on GitHub

Imports the graph from graph_def into the current default Graph. (deprecated arguments)

tf.graph_util.import_graph_def(
    graph_def, input_map=None, return_elements=None, name=None, op_dict=None,
    producer_op_list=None
)

Warning: SOME ARGUMENTS ARE DEPRECATED: (op_dict). They will be removed in a future version. Instructions for updating: Please file an issue at https://github.com/tensorflow/tensorflow/issues if you depend on this feature.

This function provides a way to import a serialized TensorFlow GraphDef protocol buffer, and extract individual objects in the GraphDef as tf.Tensor and tf.Operation objects. Once extracted, these objects are placed into the current default Graph. See tf.Graph.as_graph_def for a way to create a GraphDef proto.

Args:

Returns:

A list of Operation and/or Tensor objects from the imported graph, corresponding to the names in return_elements, and None if returns_elements is None.

Raises: