ชุดข้อมูล TensorFlow: ชุดของชุดข้อมูลที่พร้อมใช้งาน
ชุดข้อมูล TensorFlow คือชุดของชุดข้อมูลที่พร้อมใช้งาน กับ 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"]