tf.contrib.data.padded_batch_and_drop_remainder(
batch_size,
padded_shapes,
padding_values=None
)
Defined in tensorflow/contrib/data/python/ops/batching.py
.
See the guide: Dataset Input Pipeline > Transformations on existing datasets
A batching and padding transformation that omits the final small batch. (deprecated)
THIS FUNCTION IS DEPRECATED. It will be removed in a future version.
Instructions for updating:
Use tf.data.Dataset.padded_batch(..., drop_remainder=True)
.
Like tf.data.Dataset.padded_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.
See tf.contrib.data.batch_and_drop_remainder
for more details.
Args:
batch_size
: Atf.int64
scalartf.Tensor
, representing the number of consecutive elements of this dataset to combine in a single batch.padded_shapes
: A nested structure oftf.TensorShape
ortf.int64
vector tensor-like objects. Seetf.data.Dataset.padded_batch
for details.padding_values
: (Optional.) A nested structure of scalar-shapedtf.Tensor
. Seetf.data.Dataset.padded_batch
for details.
Returns:
A Dataset
transformation function, which can be passed to
tf.data.Dataset.apply