Skip to content

Instantly share code, notes, and snippets.

@sayakpaul
Created April 29, 2020 04:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sayakpaul/63a085101f3691049dff677bae7908f6 to your computer and use it in GitHub Desktop.
Save sayakpaul/63a085101f3691049dff677bae7908f6 to your computer and use it in GitHub Desktop.
# Prepare batches and randomly shuffle the training images (this time with prefetch)
train_batches = train.shuffle(1024).repeat().batch(batch_size).\
prefetch(tf.data.experimental.AUTOTUNE)
valid_batches = valid.repeat().batch(batch_size).\
prefetch(tf.data.experimental.AUTOTUNE)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment