Skip to content

Commit

Permalink
[wenet/utils/train_utils.py] fix log (#2504)
Browse files Browse the repository at this point in the history
* [wenet/utils/train_utils.py] fix log

* Update train_utils.py
  • Loading branch information
Mddct authored Apr 26, 2024
1 parent d9e5ee9 commit f42ddb2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions wenet/utils/train_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -790,8 +790,8 @@ def log_per_step(writer, info_dict, timer: Optional[StepTimer] = None):
steps_per_second = timer.steps_per_second(timer_step)
log_str += 'steps/sec {:.1f}| '.format(steps_per_second)
log_str += 'Batch {}/{} loss {:.6f} '.format(
epoch,
batch_idx + 1 if 'save_interval' not in info_dict else step + 1,
epoch, batch_idx + 1 if 'save_interval' not in info_dict else
(step + 1) * accum_grad,
tensor_to_scalar(loss_dict['loss']) * accum_grad)
for name, value in loss_dict.items():
if name != 'loss' and value is not None:
Expand Down

0 comments on commit f42ddb2

Please sign in to comment.