(self)
| 248 | state_dict_key = "amp_scaler" |
| 249 | |
| 250 | def __init__(self): |
| 251 | self._scaler = torch.cuda.amp.GradScaler() |
| 252 | |
| 253 | def __call__(self, loss, optimizer, clip_grad=None, parameters=None, create_graph=False, update_grad=True): |
| 254 | self._scaler.scale(loss).backward(create_graph=create_graph) |
nothing calls this directly
no outgoing calls
no test coverage detected