forked from mrq/DL-Art-School
no grads for mel injectors
This commit is contained in:
parent
dc471f5c6d
commit
36dd4eb61f
|
@ -69,6 +69,7 @@ class TorchMelSpectrogramInjector(Injector):
|
||||||
self.mel_norms = None
|
self.mel_norms = None
|
||||||
|
|
||||||
def forward(self, state):
|
def forward(self, state):
|
||||||
|
with torch.no_grad():
|
||||||
inp = state[self.input]
|
inp = state[self.input]
|
||||||
if len(inp.shape) == 3: # Automatically squeeze out the channels dimension if it is present (assuming mono-audio)
|
if len(inp.shape) == 3: # Automatically squeeze out the channels dimension if it is present (assuming mono-audio)
|
||||||
inp = inp.squeeze(1)
|
inp = inp.squeeze(1)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user