add grad scaler scale to metrics

This commit is contained in:
James Betker 2022-03-08 15:52:42 -07:00
parent d2bdeb6f20
commit 3e5da71b16

View File

@ -344,4 +344,6 @@ class ConfigurableStep(Module):
opt.zero_grad()
def get_metrics(self):
return self.loss_accumulator.as_dict()
metrics = self.loss_accumulator.as_dict()
metrics['grad_scaler_scale'] = self.scaler.get_scale()
return metrics