mirror of
https://github.com/wassname/TTS.git
synced 2026-09-09 11:16:00 +08:00
@@ -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):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user