Skip to content

Commit

Permalink
Fix BCE loss issue (coqui-ai#1872)
Browse files Browse the repository at this point in the history
* Fix BCE loss issue

* Remove import
  • Loading branch information
erogol authored Aug 15, 2022
1 parent c30b648 commit 4333492
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion TTS/tts/layers/losses.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ class BCELossMasked(nn.Module):

def __init__(self, pos_weight: float = None):
super().__init__()
self.pos_weight = torch.tensor([pos_weight])
self.pos_weight = nn.Parameter(torch.tensor([pos_weight]), requires_grad=False)

def forward(self, x, target, length):
"""
Expand Down

0 comments on commit 4333492

Please sign in to comment.