Skip to content

Commit

Permalink
fix exp loss
Browse files Browse the repository at this point in the history
  • Loading branch information
albertz committed Nov 8, 2024
1 parent f53691c commit 823bea6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion users/zeyer/experiments/exp2024_04_23_baselines/lm.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 823bea6

Please sign in to comment.