Commit b6c314c8 authored by Derek Murray's avatar Derek Murray Committed by TensorFlower Gardener
Browse files

[tf.data] Fix non-determinism in `tf.contrib.data.parallel_interleave()`.

Previously, there was an issue that could arise towards the end of
iteration, when the number of input elements still being processed
dropped below the cycle length. In that case, we could accidentally
interpret a regular (non-sloppy) order element as being sloppily
emitted, because it was not emitted at the first index we tried
(e.g. if the first index we tried corresponded to an exhausted
input). The previous logic would only advance to the next slot if the
element emitted was from the first index tried (on the mistaken
assumption that anything else would be sloppy). This change fixes that
issue by checking the sloppy bit as well when deciding to advance.

PiperOrigin-RevId: 209506746
parent 631e86bf
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment