diff --git a/TTS/tts/layers/losses.py b/TTS/tts/layers/losses.py index 8256c0f7..67503a76 100644 --- a/TTS/tts/layers/losses.py +++ b/TTS/tts/layers/losses.py @@ -7,6 +7,8 @@ from torch.nn import functional from TTS.tts.utils.generic_utils import sequence_mask +# pylint: disable=abstract-method Method +# relates https://github.com/pytorch/pytorch/issues/42305 class L1LossMasked(nn.Module): def __init__(self, seq_len_norm): super().__init__() @@ -145,9 +147,8 @@ class DifferentailSpectralLoss(nn.Module): target_diff = target[:, 1:] - target[:, :-1] if len(signature(self.loss_func).parameters) > 2: return self.loss_func(x_diff, target_diff, length-1) - else: - # if loss masking is not enabled - return self.loss_func(x_diff, target_diff) + # if loss masking is not enabled + return self.loss_func(x_diff, target_diff) class GuidedAttentionLoss(torch.nn.Module): diff --git a/TTS/vocoder/models/wavernn.py b/TTS/vocoder/models/wavernn.py index f771175c..638cbebc 100644 --- a/TTS/vocoder/models/wavernn.py +++ b/TTS/vocoder/models/wavernn.py @@ -16,7 +16,8 @@ from TTS.vocoder.utils.distribution import ( def stream(string, variables): sys.stdout.write(f"\r{string}" % variables) - +# pylint: disable=abstract-method +# relates https://github.com/pytorch/pytorch/issues/42305 class ResBlock(nn.Module): def __init__(self, dims): super().__init__()