[tf.data] Fix Python shape inference for `tf.contrib.data.map_and_batch()`.
authorDerek Murray <mrry@google.com>
Thu, 15 Mar 2018 01:39:25 +0000 (18:39 -0700)
committerTensorFlower Gardener <gardener@tensorflow.org>
Thu, 15 Mar 2018 01:43:47 +0000 (18:43 -0700)
commit041cf60da44f4c423c8f1ef603ce74b3377eb2d3
treea8001dd7f0c269f4e1d3b04ed2e255e6e555d204
parent6fdd2d6d912e1b918d0a89ec9a5e42991182bf69
[tf.data] Fix Python shape inference for `tf.contrib.data.map_and_batch()`.

Previously, it would incorrectly report that all batches have the same size, not accounting for the possibility of the last batch being partial.

Fixes #17720.

PiperOrigin-RevId: 189121488
tensorflow/contrib/data/python/kernel_tests/batch_dataset_op_test.py
tensorflow/contrib/data/python/ops/batching.py