Created
March 7, 2020 18:15
-
-
Save novasush/6c5beef3c496a71a17ba56b79248442f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Shuffle and batch the train_dataset. Use a buffer size of 1024 | |
# for shuffling and a batch size 32 for batching. | |
train_dataset = train_dataset.shuffle(1024).batch(32) | |
# Parallelize the loading by prefetching the train_dataset. | |
# Set the prefetching buffer size to tf.data.experimental.AUTOTUNE. | |
train_dataset = train_dataset.prefetch(tf.data.experimental.AUTOTUNE) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment