TensorFlow Datasets: 바로 사용할 수 있는 데이터 세트 모음입니다.
TensorFlow Datasets는 TensorFlow 또는 Jax와 같은 기타 Python ML 프레임워크와 함께 사용할 준비가 된 데이터 세트 모음입니다. 모든 데이터세트는
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"]노트북 에서 실행