• A. Unique TensorFlower's avatar
    Add a new option "recreate_iterator_for_each_eval" into StandardEvaluator. · 0b7674b9
    A. Unique TensorFlower authored
    In current implementation of StandardEvaluator, the iterator of evaluate dataset will go back (actually create a new iterator) to the beginning when evaluate() is called every time.
    
    In some case, the iterator need to go ahead forever. So add the new option "recreate_iterator_for_each_eval" to control this behavior.
    
    In some case, the iterator creation is time consuming. For example, careting an iterator of distributed dataset for multi worker in eager mode. So it's better to make a repeat dataset instead of recreating an iterator.
    
    If "recreate_iterator_for_each_eval" is True, then the iterator will go back; Otherwise, keep going ahead.
    
    PiperOrigin-RevId: 364356169
    0b7674b9
standard_runner.py 16.5 KB