MCPcopy Create free account
hub / github.com/OpenGVLab/HumanBench / __init__

Method __init__

PATH/core/fp16/scaler.py:19–25  ·  view source on GitHub ↗
(self, scale=1.0, dynamic=False)

Source from the content-addressed store, hash-verified

17
18class LossScaler(object):
19 def __init__(self, scale=1.0, dynamic=False):
20 self._dynamic = dynamic
21 self._loss_scale = 2.**16 if self._dynamic else scale
22 self._max_loss_scale = 2.**24
23 self._scale_seq_len = 2000
24 self._unskipped = 0
25 self._has_overflow = False
26
27 @property
28 def loss_scale(self):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected