简体   繁体   中英

OutOfRangeError logged at each epoch after upgrade from Tensorflow 1.8.0 to 1.11.0

I have a TfRecordsDataset:

...
dataset = dataset.batch(batch_size)
dataset = dataset.prefetch(buffer_size=tf.contrib.data.AUTOTUNE)
dataset_iterator = dataset.make_initializable_iterator()
(...) = dataset_iterator.get_next()

And then the standard:

test_session.run(dataset_iterator.initializer)
while not done:
    try:
        ... = test_session.run([...])
        batch_count += 1
    except tf.errors.OutOfRangeError:
        done = True

This worked perfectly with Tensorflow 1.8.0. Today I upgraded Tensorflow to TF 11.1.0, and I now have an error: OutOfRangeError: End of sequence [[{{node dataset/IteratorGetNext}} = IteratorGetNext

at each end of an epoch. The error itself is actually caught, but the error is printed on the console. Can someone point out what is actually happening ?

在TF 1.12.0中解决了问题。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM