From 7311a8f0b69c40f7417cb1f851510d0835b06794 Mon Sep 17 00:00:00 2001 From: anjali411 Date: Wed, 1 Jul 2020 15:18:21 -0700 Subject: [PATCH] use function instead of attribute for real --- torchaudio/functional.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/torchaudio/functional.py b/torchaudio/functional.py index db16ee59ec5..7a26e800c20 100644 --- a/torchaudio/functional.py +++ b/torchaudio/functional.py @@ -558,7 +558,7 @@ def phase_vocoder( complex_specgrams.size(-1), rate, device=complex_specgrams.device, - dtype=complex_specgrams.real.dtype) + dtype=torch.real(complex_specgrams).dtype) alphas = time_steps % 1.0 phase_0 = complex_specgrams[..., :1].angle()