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

Method __init__

utils.py:28–29  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

26 state_dict_key = "amp_scaler"
27
28 def __init__(self):
29 self._scaler = torch.cuda.amp.GradScaler()
30
31 def __call__(self, loss, optimizer, clip_grad=None, parameters=None, create_graph=False, update_grad=True,retain_graph=False):
32 self._scaler.scale(loss).backward(create_graph=create_graph, retain_graph=retain_graph)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected