BorisovMaksim commited on
Commit
1884263
·
1 Parent(s): ddfe3a3

Update denoisers/demucs.py

Browse files
Files changed (1) hide show
  1. denoisers/demucs.py +4 -2
denoisers/demucs.py CHANGED
@@ -85,6 +85,8 @@ class Demucs(torch.nn.Module):
85
  return x
86
 
87
  def predict(self, wav):
88
- prediction = self.forward(torch.reshape(wav, (1, 1, -1)))
89
- return prediction.detach()[0]
 
 
90
 
 
85
  return x
86
 
87
  def predict(self, wav):
88
+ with torch.no_grad():
89
+ wav_reshaped = wav.reshape((1,1,-1))
90
+ prediction = self.forward(wav_reshaped)
91
+ return prediction[0]
92