Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
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
182
def
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
188
def
set_bn_state(config, model):
Callers
2
train_one_epoch
Function · 0.85
train_one_epoch_distill_using_saved_logits
Function · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected