A batching transformation that omits the final small batch (if present).
tf.data.Dataset.batch, this transformation combines
consecutive elements of this dataset into batches. However, if the batch
size does not evenly divide the input dataset size, this transformation will
drop the final smaller element.
The following example illustrates the difference between this
dataset = tf.data.Dataset.range(200) batched = dataset.apply(tf.contrib.data.batch_and_drop_remainder(128)) print(batched.output_shapes) # ==> "(128,)" (the batch dimension is known)
dataset.batch(128) would yield a two-element dataset with
(72,), so the batch dimension would not be statically
tf.Tensor, representing the number of consecutive elements of this dataset to combine in a single batch.
Dataset transformation function, which can be passed to