add batch

This commit is contained in:
mszmyd 2024-05-05 19:28:40 +02:00
parent 1cfb74db6a
commit c6f6ae28ca

View File

@ -34,6 +34,7 @@ class Dataset:
self.dataset = self.__load_dataset()\ self.dataset = self.__load_dataset()\
.shuffle(self.shuffle_buffer_size, seed=self.seed)\ .shuffle(self.shuffle_buffer_size, seed=self.seed)\
.repeat(self.repeat)\ .repeat(self.repeat)\
.batch(self.batch_size, drop_remainder=True)\
.prefetch(tf.data.experimental.AUTOTUNE) .prefetch(tf.data.experimental.AUTOTUNE)
def __load_dataset(self) -> tf.data.Dataset: def __load_dataset(self) -> tf.data.Dataset: