## TensorFlow Datasets: a collection of ready-to-use datasets.

TensorFlow Datasets is a collection of datasets ready to use, with TensorFlow or other Python ML frameworks, such as Jax. All datasets are exposed as [`tf.data.Datasets`](https://www.tensorflow.org/api_docs/python/tf/data/Dataset.md.txt), enabling easy-to-use and high-performance input pipelines. To get started see the [guide](https://www.tensorflow.org/overview) and our [list of datasets](https://www.tensorflow.org/catalog/overview#all_datasets).

```
import tensorflow as tf
import tensorflow_datasets as tfds

# Construct a tf.data.Dataset
ds = tfds.load('mnist', split='train', shuffle_files=True)

# Build your input pipeline
ds = ds.shuffle(1024).batch(32).prefetch(tf.data.AUTOTUNE)
for example in ds.take(1):
  image, label = example["image"], example["label"]
```
[Run in a Notebook](https://colab.research.google.com/github/tensorflow/datasets/blob/master/docs/_index.ipynb) [![](http://www.tensorflow.org/static/resources/images/tf-logo-card-16x9.png)](https://blog.tensorflow.org/2019/02/introducing-tensorflow-datasets.html)

### [Introducing TensorFlow Datasets](https://blog.tensorflow.org/2019/02/introducing-tensorflow-datasets.html)

[Read on TensorFlow Blog](https://blog.tensorflow.org/2019/02/introducing-tensorflow-datasets.html) [![](http://www.tensorflow.org/static/resources/images/github-card-16x9.png)](https://github.com/tensorflow/datasets)

### [TensorFlow Datasets on GitHub](https://github.com/tensorflow/datasets)

[View on GitHub](https://github.com/tensorflow/datasets)