Merge branch 'dev' of https://github.com/shahules786/enhancer into dev-hawk

This commit is contained in:
shahules786 2022-11-07 13:01:21 +05:30
commit 846b64ab88
1 changed files with 1 additions and 0 deletions

View File

@ -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