def before_run(self, run_context): del run_context # Unused if not self._train_manager.should_train(self._spec): return None if self._increment_step_op is None: # None on TPU. return tf_compat.SessionRunArgs(self._spec.step) return tf_compat.SessionRunArgs(self._increment_step_op)
def before_run(self, run_context): del run_context # Unused if self._train_manager.should_train(self._spec): return tf_compat.SessionRunArgs(self._spec.loss)