מערכי נתונים של TensorFlow: אוסף של מערכי נתונים מוכנים לשימוש.

TensorFlow Datasets הוא אוסף של מערכי נתונים מוכנים לשימוש, עם TensorFlow או מסגרות אחרות של Python ML, כגון Jax. כל מערכי הנתונים חשופים כ- tf.data.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"]
הפעל במחברת