# tf.contrib.graph_editor.copy

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/contrib/graph_editor/transform.py#L591-L623) |

Copy a subgraph.

    tf.contrib.graph_editor.copy(
        sgv, dst_graph=None, dst_scope='', src_scope='', reuse_dst_scope=False
    )

<br />

<br />

<br />

| ## Args ||
|---|---|
| `sgv` | the source subgraph-view. This argument is converted to a subgraph using the same rules than the function subgraph.make_view. |
| `dst_graph` | the destination graph. |
| `dst_scope` | the destination scope. |
| `src_scope` | the source scope. |
| `reuse_dst_scope` | if True the dst_scope is re-used if it already exists. Otherwise, the scope is given a unique name based on the one given by appending an underscore followed by a digit (default). |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| A tuple `(sgv, info)` where: `sgv` is the transformed subgraph view; `info` is an instance of TransformerInfo containing information about the transform, including mapping between original and transformed tensors and operations. ||

<br />

<br />

<br />

<br />

| ## Raises ||
|---|---|
| `TypeError` | if `dst_graph` is not a [`tf.Graph`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/Graph). |
| `StandardError` | if sgv cannot be converted to a SubGraphView using the same rules than the function subgraph.make_view. |

<br />