# tf.keras.datasets.mnist.load_data

<br />

|---|---|
| [![](https://www.tensorflow.org/images/tf_logo_32px.png) TensorFlow 1 version](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/keras/datasets/mnist/load_data) | [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.0.0/tensorflow/python/keras/datasets/mnist.py#L27-L55) |

Loads the MNIST dataset.

#### View aliases


**Compat aliases for migration**

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

[`tf.compat.v1.keras.datasets.mnist.load_data`](https://www.tensorflow.org/api_docs/python/tf/keras/datasets/mnist/load_data)

<br />

    tf.keras.datasets.mnist.load_data(
        path='mnist.npz'
    )

<br />

<br />

<br />

| ## Arguments ||
|---|---|
| `path` | path where to cache the dataset locally (relative to \~/.keras/datasets). |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| Tuple of Numpy arrays: `(x_train, y_train), (x_test, y_test)`. ||

<br />

#### License:

Yann LeCun and Corinna Cortes hold the copyright of MNIST dataset,
which is a derivative work from original NIST datasets.
MNIST dataset is made available under the terms of the
[Creative Commons Attribution-Share Alike 3.0 license.](https://creativecommons.org/licenses/by-sa/3.0/)