CTC loss return tensor

This commit is contained in:
Yifan Yang 2023-06-16 14:52:39 +08:00 committed by GitHub
parent 0a465794a8
commit 79b877f037
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -353,6 +353,6 @@ class AsrModel(nn.Module):
target_lengths=y_lens,
)
else:
ctc_loss = 0
ctc_loss = torch.zeros(0)
return simple_loss, pruned_loss, ctc_loss