using dataset drop_remainder option
fixes
@@ -234,10 +234,10 @@ class ImageWindowDataset(Layer):
if self.smaller_final_batch_mode == 'drop':
# drop the remainder if there's not enough windows to
# form a batch, so that we have a fixed batch size.
- dataset = dataset.apply(tf.contrib.data.batch_and_drop_remainder(
- batch_size=self.batch_size))
- # dataset = dataset.batch(batch_size=self.batch_size,
- # drop_remainder=True)
+ # dataset = dataset.apply(tf.contrib.data.batch_and_drop_remainder(
+ # batch_size=self.batch_size))
+ dataset = dataset.batch(batch_size=self.batch_size,
+ drop_remainder=True)
return dataset
dataset = dataset.batch(batch_size=self.batch_size)
