Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions torchaudio/functional/functional.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is this for?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will set the message to ... and will be removed from 0.11 release..

f'{func.__module__}.{func.__name__} has been deprecated '
f'and will be removed from {"future" if version is None else version} release. '
f'{direction}')

)
def complex_norm(
complex_tensor: Tensor,
Expand All @@ -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
Expand All @@ -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,
Expand Down Expand Up @@ -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 "
Expand Down