Exemple #1
0
 def on_batch_end(self, state: _State):
     state.batch_metrics = self._process_metrics(state.batch_metrics)
     for key, value in state.batch_metrics.items():
         self.meters[key].add(value)
Exemple #2
0
 def on_batch_start(self, state: _State):
     state.batch_metrics = defaultdict(None)