MCPcopy
hub / github.com/microsoft/Cream / is_valid_grad_norm

Function is_valid_grad_norm

TinyViT/main.py:182–185  ·  view source on GitHub ↗
(num)

Source from the content-addressed store, hash-verified

180
181
182def is_valid_grad_norm(num):
183 if num is None:
184 return False
185 return not bool(torch.isinf(num)) and not bool(torch.isnan(num))
186
187
188def set_bn_state(config, model):

Callers 2

train_one_epochFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected