Search⌘ K
AI Features

Dataset

Explore methods to create datasets in TensorFlow, including from NumPy data, image filenames, and specialized formats like TFRecords and text files. Understand how to build input pipelines that support scalable machine learning models by managing various data sources effectively.

Chapter Goals:

  • Learn how to create a dataset in TensorFlow
  • Implement a function that creates a dataset from NumPy data

A. Input pipeline

In TensorFlow, the input pipeline for executing a machine learning model is represented by the Dataset class (which we’ll refer to as simply a dataset). A dataset can be created for a variety of input values, from NumPy arrays to protocol buffers. The most basic way to create a dataset is with the ...