From df02e876aeaafd15d479d02ade6bac0bb8aa7a5f Mon Sep 17 00:00:00 2001 From: Edresson Date: Fri, 31 Jul 2020 01:58:22 -0300 Subject: [PATCH] fix Lint check errors --- mozilla_voice_tts/speaker_encoder/losses.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mozilla_voice_tts/speaker_encoder/losses.py b/mozilla_voice_tts/speaker_encoder/losses.py index f4687949..750648e5 100644 --- a/mozilla_voice_tts/speaker_encoder/losses.py +++ b/mozilla_voice_tts/speaker_encoder/losses.py @@ -152,7 +152,7 @@ class AngleProtoLoss(nn.Module): out_positive = x[:, 0, :] num_speakers = out_anchor.size()[0] - cos_sim_matrix = F.cosine_similarity(out_positive.unsqueeze(-1).expand(-1, -1, num_speakers),out_anchor.unsqueeze(-1).expand(-1, -1,num_speakers).transpose(0, 2)) + cos_sim_matrix = F.cosine_similarity(out_positive.unsqueeze(-1).expand(-1, -1, num_speakers), out_anchor.unsqueeze(-1).expand(-1, -1, num_speakers).transpose(0, 2)) torch.clamp(self.w, 1e-6) cos_sim_matrix = cos_sim_matrix * self.w + self.b label = torch.from_numpy(np.asarray(range(0, num_speakers))).to(cos_sim_matrix.device)