Fix Speaker Consistency Loss (SCL) ()

This commit is contained in:
Edresson Casanova 2023-02-27 03:14:00 -03:00 committed by GitHub
parent a365a7e888
commit 16b9862252
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 9 deletions
TTS/encoder/models

View File

@ -161,8 +161,6 @@ class ResNetSpeakerEncoder(BaseEncoder):
Shapes: Shapes:
- x: :math:`(N, 1, T_{in})` or :math:`(N, D_{spec}, T_{in})` - x: :math:`(N, 1, T_{in})` or :math:`(N, D_{spec}, T_{in})`
""" """
with torch.no_grad():
with torch.cuda.amp.autocast(enabled=False):
x.squeeze_(1) x.squeeze_(1)
# if you torch spec compute it otherwise use the mel spec computed by the AP # if you torch spec compute it otherwise use the mel spec computed by the AP
if self.use_torch_spec: if self.use_torch_spec: