From 823bea64c47d7fca25b579036a7e33853213156e Mon Sep 17 00:00:00 2001 From: Albert Zeyer Date: Fri, 8 Nov 2024 16:58:58 +0100 Subject: [PATCH] fix exp loss https://github.com/rwth-i6/returnn/issues/1642 --- users/zeyer/experiments/exp2024_04_23_baselines/lm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/users/zeyer/experiments/exp2024_04_23_baselines/lm.py b/users/zeyer/experiments/exp2024_04_23_baselines/lm.py index d28d42eaf..3fe0d3665 100644 --- a/users/zeyer/experiments/exp2024_04_23_baselines/lm.py +++ b/users/zeyer/experiments/exp2024_04_23_baselines/lm.py @@ -622,7 +622,7 @@ def lm_train_def( elif use_normalized_loss == "none": loss.mark_as_loss("ce", use_normalized_loss=False) elif use_normalized_loss == "seqs": - loss.mark_as_loss("ce", as_error=True) # don't use this for training directly, just for reporting + loss.mark_as_loss("ce", scale=0) # don't use this for training directly, just for reporting loss_ = rf.pad_packed(loss, dims=batch_dims + [targets_w_eos_spatial_dim], in_dim=pack_dim) seq_loss = rf.reduce_sum(loss_, axis=targets_w_eos_spatial_dim) seq_loss.mark_as_loss("seq_ce", use_normalized_loss=True)