Set a default for datasets end_of_sequence.

While all datasets carefully set the end_of_sequence to true at the
appropriate time, some datasets might forget to set it to false in the normal
case. In order to avoid potential undefined behavior, we set the
end_of_sequence variable to be false by default.

PiperOrigin-RevId: 158337799
This commit is contained in:
Brennan Saeta 2017-06-07 17:04:33 -07:00 committed by TensorFlower Gardener
parent 187404eac0
commit 892293d987

View File

@ -307,7 +307,7 @@ class IteratorGetNextOp : public AsyncOpKernel {
core::ScopedUnref unref_iterator(iterator);
std::vector<Tensor> components;
bool end_of_sequence;
bool end_of_sequence = false;
IteratorContext::Params params;
params.env = ctx->env();