I suppose that evaluate doesn’t reset at the end of the cycle but just at the beginning:

  

      github.com
  

  
    keras-team/keras/blob/master/keras/engine/training.py#L1531-L1544 2



      
      
          for _, iterator in data_handler.enumerate_epochs():  # Single epoch.
            self.reset_metrics()
            with data_handler.catch_stop_iteration():
              for step in data_handler.steps():
                with tf.profiler.experimental.Trace('test', step_num=step, _r=1):
                  callbacks.on_test_batch_begin(step)
                  tmp_logs = self.test_function(iterator)
                  if data_handler.should_sync:
                    context.async_wait()
                  logs = tmp_logs  # No error, now safe to assign to logs.
                  end_step = step + data_handler.step_increment
                  callbacks.on_test_batch_end(end_step, logs)
          logs = tf_utils.sync_to_numpy_or_python_type(logs)
          callbacks.on_test_end(logs=logs)