# tf.compat.v1.train.create_global_step

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.1.0/tensorflow/python/training/training_util.py#L106-L144) |

Create global step tensor in graph.

    tf.compat.v1.train.create_global_step(
        graph=None
    )

<br />

<br />

<br />

| ## Args ||
|---|---|
| `graph` | The graph in which to create the global step tensor. If missing, use default graph. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| Global step tensor. ||

<br />

<br />

<br />

<br />

| ## Raises ||
|---|---|
| `ValueError` | if global step tensor is already defined. |

<br />