MCPcopy Create free account
hub / github.com/zai-org/CodeGeeX / scale_loss

Method scale_loss

codegeex/megatron/optimizer/optimizer.py:98–100  ·  view source on GitHub ↗

Simple scaling.

(self, loss)

Source from the content-addressed store, hash-verified

96 pass
97
98 def scale_loss(self, loss):
99 """Simple scaling."""
100 return self.get_loss_scale() * loss
101
102 @abstractmethod
103 def step(self):

Callers 1

backward_stepFunction · 0.80

Calls 1

get_loss_scaleMethod · 0.95

Tested by

no test coverage detected