Skip to content

Commit bc1df48

Browse files
authored
Remove in-place operations from GriffinLim for backprop (#730)
1 parent b17da7a commit bc1df48

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

torchaudio/functional.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ def griffinlim(
265265
angles = rebuilt
266266
if momentum:
267267
angles = angles - tprev.mul_(momentum / (1 + momentum))
268-
angles = angles.div_(complex_norm(angles).add_(1e-16).unsqueeze(-1).expand_as(angles))
268+
angles = angles.div(complex_norm(angles).add(1e-16).unsqueeze(-1).expand_as(angles))
269269

270270
# Return the final phase estimates
271271
waveform = istft(specgram * angles,

0 commit comments

Comments
 (0)