Commit 4f1b0ee6 authored by Haoyu Zhang's avatar Haoyu Zhang Committed by TensorFlower Gardener
Browse files

Prevent repeatedly calling iterator.get_next() in Keras training loop.

Calling iterator.get_next() repeatedly causes execution slowdown and eventually leads to OOM. This change avoids this call on (1) training dataset iterator when the dataset needs to be reset after an epoch; (2) validation dataset iterator when multiple validation passes need to be invoked during training.

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