Skip to content

Commit

Permalink
Merge pull request #2230 from TianyiFranklinWang/main
Browse files Browse the repository at this point in the history
Avoid zero division error
  • Loading branch information
rwightman authored Jul 15, 2024
2 parents 648aaa4 + d3ce5a8 commit 3196d6b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion train.py
Original file line number Diff line number Diff line change
Expand Up @@ -1070,7 +1070,7 @@ def _backward(_loss):
if utils.is_primary(args):
_logger.info(
f'Train: {epoch} [{update_idx:>4d}/{updates_per_epoch} '
f'({100. * update_idx / (updates_per_epoch - 1):>3.0f}%)] '
f'({100. * (update_idx + 1) / updates_per_epoch:>3.0f}%)] '
f'Loss: {losses_m.val:#.3g} ({losses_m.avg:#.3g}) '
f'Time: {update_time_m.val:.3f}s, {update_sample_count / update_time_m.val:>7.2f}/s '
f'({update_time_m.avg:.3f}s, {update_sample_count / update_time_m.avg:>7.2f}/s) '
Expand Down

0 comments on commit 3196d6b

Please sign in to comment.