mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-08-11 11:02:29 +00:00
Minor fixes.
This commit is contained in:
parent
8b4c571824
commit
76632bddfe
@ -503,11 +503,12 @@ def compute_validation_loss(
|
|||||||
batch=batch,
|
batch=batch,
|
||||||
is_training=False,
|
is_training=False,
|
||||||
)
|
)
|
||||||
assert loss.requires_grad is False
|
assert transduer_loss.requires_grad is False
|
||||||
|
assert aux_loss.requires_grad is False
|
||||||
tot_loss = tot_loss + loss_info
|
tot_loss = tot_loss + loss_info
|
||||||
|
|
||||||
if world_size > 1:
|
if world_size > 1:
|
||||||
tot_loss.reduce(loss.device)
|
tot_loss.reduce(transduer_loss.device)
|
||||||
|
|
||||||
loss_value = tot_loss["tot_loss"] / tot_loss["frames"]
|
loss_value = tot_loss["tot_loss"] / tot_loss["frames"]
|
||||||
if loss_value < params.best_valid_loss:
|
if loss_value < params.best_valid_loss:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user