MCPcopy Create free account
hub / github.com/drinkingcoder/FlowFormer-Official / GradScaler

Class GradScaler

train_FlowFormer.py:38–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36except:
37 # dummy GradScaler for PyTorch < 1.6
38 class GradScaler:
39 def __init__(self):
40 pass
41 def scale(self, loss):
42 return loss
43 def unscale_(self, optimizer):
44 pass
45 def step(self, optimizer):
46 optimizer.step()
47 def update(self):
48 pass
49
50#torch.autograd.set_detect_anomaly(True)
51

Callers 1

trainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected