Minor fixes

This commit is contained in:
pkufool 2024-11-21 12:10:48 +08:00
parent 3bd4a2e6c3
commit 3698ca040f

View File

@ -471,13 +471,6 @@ def get_parser():
help="When using cr-ctc, we increase the time-masking ratio.", help="When using cr-ctc, we increase the time-masking ratio.",
) )
parser.add_argument(
"--cr-loss-masked-scale",
type=float,
default=1.0,
help="The value used to scale up the cr_loss at masked positions",
)
parser.add_argument( parser.add_argument(
"--attention-decoder-loss-scale", "--attention-decoder-loss-scale",
type=float, type=float,
@ -966,9 +959,8 @@ def compute_loss(
spec_augment=spec_augment, spec_augment=spec_augment,
supervision_segments=supervision_segments, supervision_segments=supervision_segments,
time_warp_factor=params.spec_aug_time_warp_factor, time_warp_factor=params.spec_aug_time_warp_factor,
cr_loss_masked_scale=params.cr_loss_masked_scale,
) )
simple_loss, pruned_loss, ctc_loss = losses[:3] simple_loss, pruned_loss, ctc_loss, attention_decoder_loss, cr_loss = losses[:5]
loss = 0.0 loss = 0.0