# tf.train.create_global_step

<br />

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

Create global step tensor in graph.

#### View aliases


**Compat aliases for migration**

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

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

<br />

    tf.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 />