tf.compat.v1.graph_util.extract_sub_graph

Extract the subgraph that can reach any of the nodes in 'dest_nodes'. (deprecated)

graph_def A graph_pb2.GraphDef proto.
dest_nodes A list of strings specifying the destination node names.

The GraphDef of the sub-graph.

TypeError If 'graph_def' is not a graph_pb2.GraphDef proto.