Data Preprocessing (Part 1)
Learn to preprocess TF datasets using the shuffle, repeat, batch, and unbatch transformations.
The TF framework provides us with the tf.data
API to construct TF datasets. This API allows us to preprocess TF datasets using various transformations, such as the shuffle
, repeat
, batch
, and unbatch
transformations. Let’s explore the use of these transformations.
The shuffle
transformation
The shuffle
transformation randomly mixes the elements of tf.data.Dataset
. The following code applies this transformation to a given dataset.
Get hands-on with 1400+ tech skills courses.