from local
This commit is contained in:
parent
42259f2af5
commit
298e087b76
Binary file not shown.
@ -1073,9 +1073,10 @@ def train_one_epoch(
|
||||
# of the grad scaler is configurable, but we can't configure it to have different
|
||||
# behavior depending on the current grad scale.
|
||||
cur_grad_scale = scaler._scale.item()
|
||||
'''
|
||||
if cur_grad_scale < 1.0 or (cur_grad_scale < 8.0 and batch_idx % 400 == 0):
|
||||
continue
|
||||
#scaler.update(cur_grad_scale * 2.0)
|
||||
scaler.update(cur_grad_scale * 2.0)
|
||||
'''
|
||||
if cur_grad_scale < 0.01:
|
||||
logging.warning(f"Grad scale is small: {cur_grad_scale}")
|
||||
if cur_grad_scale < 1.0e-05:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user