Member-only story
Using Inbuilt Datasets with TensorFlow Datasets (TFDS)
Take advantage of ready-to-use datasets with TensorFlow for your ML and DL tasks
7 min readMar 26, 2023
The TensorFlow Datasets (TFDS) library provides ready-to-use, inbuilt datasets for your ML and DL tasks.
Topics included
---------------
1. Installation of TFDS via pip and conda
2. Import convention
3. Getting the list of all available datasets
4. The tfds.load() function
5. Using the info object to unpack more information
6. Loading data as NumPy arrays
7. Custom splits - Split data according to your needs!
8. Visualizing data as a Pandas DataFrame
9. Using the tfds.show_examples() function
TFDS does not directly come with TensorFlow installation. So, a separate installation is needed. It can be installed by running one of the following commands.
- pip installation:
# Stable version
pip install tensorflow-datasets
- conda installation:
# Stable version
conda install -c conda-forge tensorflow-datasets
TFDS is available under Apache 2.0 license, meaning that it can be freely used for personal and commercial purposes.
The import convention is as follows.
import tensorflow_datasets as tfds