Ejemplo n.º 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)
Ejemplo n.º 2
0
 def on_batch_start(self, state: _State):
     state.batch_metrics = defaultdict(None)