mv coeff to device
This commit is contained in:
parent
82308750dc
commit
3cbd0ba7cc
|
|
@ -85,6 +85,7 @@ class ConviSTFT(ConvFFT):
|
||||||
input = torch.cat([real, imag], 1)
|
input = torch.cat([real, imag], 1)
|
||||||
out = F.conv_transpose1d(input, self.weight, stride=self.hop_size)
|
out = F.conv_transpose1d(input, self.weight, stride=self.hop_size)
|
||||||
coeff = self.window.unsqueeze(1).repeat(1, 1, input.size(-1)) ** 2
|
coeff = self.window.unsqueeze(1).repeat(1, 1, input.size(-1)) ** 2
|
||||||
|
coeff.to(self.device)
|
||||||
coeff = F.conv_transpose1d(coeff, self.enframe, stride=self.hop_size)
|
coeff = F.conv_transpose1d(coeff, self.enframe, stride=self.hop_size)
|
||||||
out = out / (coeff + 1e-8)
|
out = out / (coeff + 1e-8)
|
||||||
pad = self.window_len - self.hop_size
|
pad = self.window_len - self.hop_size
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue