# tf.raw_ops.DatasetToGraphV2

<br />

Returns a serialized GraphDef representing `input_dataset`.

#### View aliases


**Compat aliases for migration**

See
[Migration guide](https://www.tensorflow.org/guide/migrate) for
more details.

[`tf.compat.v1.raw_ops.DatasetToGraphV2`](https://www.tensorflow.org/api_docs/python/tf/raw_ops/DatasetToGraphV2)

<br />

    tf.raw_ops.DatasetToGraphV2(
        input_dataset,
        external_state_policy=0,
        strip_device_assignment=False,
        name=None
    )

Returns a graph representation for `input_dataset`.

<br />

<br />

<br />

| ## Args ||
|---|---|
| `input_dataset` | A `Tensor` of type `variant`. A variant tensor representing the dataset to return the graph representation for. |
| `external_state_policy` | An optional `int`. Defaults to `0`. |
| `strip_device_assignment` | An optional `bool`. Defaults to `False`. |
| `name` | A name for the operation (optional). |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| A `Tensor` of type `string`. ||

<br />