From 27d9533de37708730d06efb00a9e4a34db3d8fc5 Mon Sep 17 00:00:00 2001 From: moto <855818+mthrok@users.noreply.github.com> Date: Fri, 4 Jun 2021 15:44:09 +0000 Subject: [PATCH] Set removal version of pseudo complex support --- torchaudio/functional/functional.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/torchaudio/functional/functional.py b/torchaudio/functional/functional.py index 70045018d9..ea6ca4e0fc 100644 --- a/torchaudio/functional/functional.py +++ b/torchaudio/functional/functional.py @@ -523,7 +523,8 @@ def mu_law_decoding( "Please convert the input Tensor to complex type with `torch.view_as_complex` then " "use `torch.abs`. " "Please refer to https://github.com/pytorch/audio/issues/1337 " - "for more details about torchaudio's plan to migrate to native complex type." + "for more details about torchaudio's plan to migrate to native complex type.", + version="0.11", ) def complex_norm( complex_tensor: Tensor, @@ -548,7 +549,8 @@ def complex_norm( "Please convert the input Tensor to complex type with `torch.view_as_complex` then " "use `torch.angle`. " "Please refer to https://github.com/pytorch/audio/issues/1337 " - "for more details about torchaudio's plan to migrate to native complex type." + "for more details about torchaudio's plan to migrate to native complex type.", + version="0.11", ) def angle( complex_tensor: Tensor @@ -568,7 +570,8 @@ def angle( "Please convert the input Tensor to complex type with `torch.view_as_complex` then " "use `torch.abs` and `torch.angle`. " "Please refer to https://github.com/pytorch/audio/issues/1337 " - "for more details about torchaudio's plan to migrate to native complex type." + "for more details about torchaudio's plan to migrate to native complex type.", + version="0.11", ) def magphase( complex_tensor: Tensor, @@ -635,8 +638,9 @@ def phase_vocoder( if not complex_specgrams.is_complex(): warnings.warn( - "The use of pseudo complex type in `torchaudio.functional.phase_vocoder` and " - "`torchaudio.transforms.TimeStretch` is now deprecated." + "The support for pseudo complex type in `torchaudio.functional.phase_vocoder` and " + "`torchaudio.transforms.TimeStretch` is now deprecated and will be removed " + "from 0.11 release." "Please migrate to native complex type by converting the input tensor with " "`torch.view_as_complex`. " "Please refer to https://github.com/pytorch/audio/issues/1337 "