from local

This commit is contained in:
dohe0342 2022-12-13 17:04:56 +09:00
parent 10441be466
commit 83123c3baa
3 changed files with 1 additions and 4 deletions

Binary file not shown.

View File

@ -1009,10 +1009,7 @@ def train_one_epoch(
# NOTE: We use reduction==sum and loss is computed over utterances
# in the batch and there is no normalization to it so far.
if scaler._scale.item() >= 1.0e-05:
scaler.scale(loss).backward()
else:
logging.warning(f"Grad scale is small: {cur_grad_scale}")
logging.warning(f"Grad scale is small: {cur_grad_scale}")
if params.multi_optim and batch_idx % params.accum_grads == 0:
set_batch_count(model, params.batch_idx_train)