from local

This commit is contained in:
dohe0342 2023-04-11 14:21:41 +09:00
parent 95c3d5b854
commit 85697a7370
2 changed files with 2 additions and 1 deletions

View File

@ -1055,7 +1055,8 @@ def train_one_epoch(
is_training=True,
decode = True if batch_idx % params.decode_interval == 0 else False,
)
loss_info.reduce(loss.device)
try: loss_info.reduce(loss.device)
except: pass
numel = params.world_size / (params.accum_grads * loss_info["utterances"])
loss *= numel ## normalize loss over utts(batch size)