mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-08-09 01:52:41 +00:00
Update train.py ("10"--->"params.log_interval") (#76)
* Update train.py * Update train.py * Update train.py
This commit is contained in:
parent
597c5efdb1
commit
391432b356
@ -485,7 +485,7 @@ def train_one_epoch(
|
|||||||
f"tot_loss[{tot_loss}], batch size: {batch_size}"
|
f"tot_loss[{tot_loss}], batch size: {batch_size}"
|
||||||
)
|
)
|
||||||
|
|
||||||
if batch_idx % 10 == 0:
|
if batch_idx % params.log_interval == 0:
|
||||||
|
|
||||||
if tb_writer is not None:
|
if tb_writer is not None:
|
||||||
loss_info.write_summary(
|
loss_info.write_summary(
|
||||||
|
@ -435,7 +435,7 @@ def train_one_epoch(
|
|||||||
f"batch {batch_idx}, loss[{loss_info}], "
|
f"batch {batch_idx}, loss[{loss_info}], "
|
||||||
f"tot_loss[{tot_loss}], batch size: {batch_size}"
|
f"tot_loss[{tot_loss}], batch size: {batch_size}"
|
||||||
)
|
)
|
||||||
if batch_idx % 10 == 0:
|
if batch_idx % params.log_interval == 0:
|
||||||
|
|
||||||
if tb_writer is not None:
|
if tb_writer is not None:
|
||||||
loss_info.write_summary(
|
loss_info.write_summary(
|
||||||
|
@ -416,7 +416,7 @@ def train_one_epoch(
|
|||||||
f"batch {batch_idx}, loss[{loss_info}], "
|
f"batch {batch_idx}, loss[{loss_info}], "
|
||||||
f"tot_loss[{tot_loss}], batch size: {batch_size}"
|
f"tot_loss[{tot_loss}], batch size: {batch_size}"
|
||||||
)
|
)
|
||||||
if batch_idx % 10 == 0:
|
if batch_idx % params.log_interval == 0:
|
||||||
|
|
||||||
if tb_writer is not None:
|
if tb_writer is not None:
|
||||||
loss_info.write_summary(
|
loss_info.write_summary(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user