"git@developer.sourcefind.cn:wangsen/mineru.git" did not exist on "50a6eda889cf2d207eb6b77adc3cd873803efbb6"
Unverified Commit ae86bfd9 authored by Tian Lin's avatar Tian Lin Committed by GitHub
Browse files

Add repeat to datasets. (#6001)

parent fd2802cf
...@@ -69,6 +69,6 @@ class Cifar10Dataset(object): ...@@ -69,6 +69,6 @@ class Cifar10Dataset(object):
y_train = tf.keras.utils.to_categorical(y_train, self.num_classes) y_train = tf.keras.utils.to_categorical(y_train, self.num_classes)
y_test = tf.keras.utils.to_categorical(y_test, self.num_classes) y_test = tf.keras.utils.to_categorical(y_test, self.num_classes)
self.train_dataset = tf.data.Dataset.from_tensor_slices( self.train_dataset = tf.data.Dataset.from_tensor_slices(
(x_train, y_train)).shuffle(2000).batch(batch_size) (x_train, y_train)).shuffle(2000).batch(batch_size).repeat()
self.test_dataset = tf.data.Dataset.from_tensor_slices( self.test_dataset = tf.data.Dataset.from_tensor_slices(
(x_test, y_test)).shuffle(2000).batch(batch_size) (x_test, y_test)).shuffle(2000).batch(batch_size).repeat()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment