kevinwang676 commited on
Commit
b530255
·
verified ·
1 Parent(s): 8c34cab

Update egs/visinger2/models.py

Browse files
Files changed (1) hide show
  1. egs/visinger2/models.py +3 -2
egs/visinger2/models.py CHANGED
@@ -582,8 +582,9 @@ class Generator_Noise(torch.nn.Module):
582
  real = amp * torch.cos(phase)
583
  imag = amp * torch.sin(phase)
584
  spec = torch.cat([real, imag], 3)
585
- istft_x = torch.istft(spec, self.fft_size, self.hop_size, self.win_size, self.window.to(amp), True, length=x.shape[2] * self.hop_size, return_complex=True)
586
- istft_x = torch.view_as_real(istft_x)
 
587
 
588
  return istft_x.unsqueeze(1)
589
 
 
582
  real = amp * torch.cos(phase)
583
  imag = amp * torch.sin(phase)
584
  spec = torch.cat([real, imag], 3)
585
+ istft_x = torch.view_as_complex(istft_x)
586
+
587
+ istft_x = torch.istft(spec, self.fft_size, self.hop_size, self.win_size, self.window.to(amp), True, length=x.shape[2] * self.hop_size, return_complex=False)
588
 
589
  return istft_x.unsqueeze(1)
590