add dummy exception (W0719)

This commit is contained in:
Jim O'Regan
2024-10-02 13:51:17 +00:00
parent 7cfae6bed4
commit 404b045b65

View File

@@ -4,6 +4,10 @@
import torch import torch
class ModeException(Exception):
pass
class Denoiser(torch.nn.Module): class Denoiser(torch.nn.Module):
"""Removes model bias from audio produced with waveglow""" """Removes model bias from audio produced with waveglow"""
@@ -20,7 +24,7 @@ class Denoiser(torch.nn.Module):
elif mode == "normal": elif mode == "normal":
mel_input = torch.randn((1, 80, 88), dtype=dtype, device=device) mel_input = torch.randn((1, 80, 88), dtype=dtype, device=device)
else: else:
raise Exception(f"Mode {mode} if not supported") raise ModeException(f"Mode {mode} if not supported")
def stft_fn(audio, n_fft, hop_length, win_length, window): def stft_fn(audio, n_fft, hop_length, win_length, window):
spec = torch.stft( spec = torch.stft(