MCPcopy Create free account
hub / github.com/FLC777/GLAT / _decrease_loss_scale

Method _decrease_loss_scale

fairseq/optim/dynamic_loss_scaler.py:37–40  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

35 self._iter += 1
36
37 def _decrease_loss_scale(self):
38 self.loss_scale /= self.scale_factor
39 if self.threshold is not None:
40 self.loss_scale = max(self.loss_scale, self.threshold)
41
42 def check_overflow(self, grad_norm):
43 # detect inf and nan

Callers 1

check_overflowMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected