set requires_grad=False

This commit is contained in:
gerazov
2021-01-16 19:46:04 +01:00
parent c96f7a2614
commit b2b4828f17
+2 -1
View File
@@ -11,7 +11,8 @@ class TorchSTFT(nn.Module):
self.n_fft = n_fft
self.hop_length = hop_length
self.win_length = win_length
self.window = nn.Parameter(getattr(torch, window)(win_length))
self.window = nn.Parameter(getattr(torch, window)(win_length),
requires_grad=False)
def __call__(self, x):
# B x D x T x 2