From 2dc8baa5c45a36f134bc064e158114659dc8a020 Mon Sep 17 00:00:00 2001 From: Mddct Date: Fri, 20 Sep 2024 16:43:30 +0800 Subject: [PATCH] restore bestrq --- wenet/ssl/bestrq/bestrq_model.py | 1 - 1 file changed, 1 deletion(-) diff --git a/wenet/ssl/bestrq/bestrq_model.py b/wenet/ssl/bestrq/bestrq_model.py index 9dcf84ac1..b70fd13db 100644 --- a/wenet/ssl/bestrq/bestrq_model.py +++ b/wenet/ssl/bestrq/bestrq_model.py @@ -279,7 +279,6 @@ def _stack_features(self, input: torch.Tensor, def _compute_loss(self, input: torch.Tensor, target: torch.Tensor, mask: torch.Tensor) -> torch.Tensor: logits = input.transpose(1, 2).contiguous().view(-1, input.size(-1)) - mask = mask.unsqueeze(2).repeat(1, 1, self.num_codebooks) loss = torch.nn.functional.cross_entropy( logits, target.contiguous().view(-1),