<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.21.0/tensorflow/python/framework/graph_util_impl.py#L218-L258) |

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

    tf.compat.v1.graph_util.extract_sub_graph(
        graph_def, dest_nodes
    )

> [!WARNING]
> **Deprecated:** THIS FUNCTION IS DEPRECATED. It will be removed in a future version. Instructions for updating: This API was designed for TensorFlow v1. See <https://www.tensorflow.org/guide/migrate> for instructions on how to migrate your code to TensorFlow v2.

<br />

<br />

<br />

| ## Args ||
|---|---|
| `graph_def` | A graph_pb2.GraphDef proto. |
| `dest_nodes` | An iterable of strings specifying the destination node names. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| The GraphDef of the sub-graph. ||

<br />

<br />

<br />

<br />

| ## Raises ||
|---|---|
| `TypeError` | If 'graph_def' is not a graph_pb2.GraphDef proto. |

<br />