from local

This commit is contained in:
dohe0342 2022-12-10 13:57:49 +09:00
parent 685d39918f
commit 766ed65609
2 changed files with 5 additions and 0 deletions

View File

@ -947,6 +947,11 @@ def train_one_epoch(
batch=batch,
is_training=True,
)
loss_info.reduce(loss.device)
numel = params.world_size / (params.accum_grads * loss_info["utterances"])
loss *= numel ## normalize loss over utts(batch size)
# summary stats
tot_loss = (tot_loss * (1 - 1 / params.reset_interval)) + loss_info