Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
Torchaudio
Commits
d35ea80e
"vscode:/vscode.git/clone" did not exist on "b73d3d6ed96f8459776b23d4fba1af746e643fa4"
Unverified
Commit
d35ea80e
authored
Oct 26, 2021
by
S Harish
Committed by
GitHub
Oct 26, 2021
Browse files
Remove deprecated `F.magphase` (#1934)
parent
cbf267c3
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
32 deletions
+0
-32
docs/source/functional.rst
docs/source/functional.rst
+0
-4
torchaudio/functional/__init__.py
torchaudio/functional/__init__.py
+0
-2
torchaudio/functional/functional.py
torchaudio/functional/functional.py
+0
-26
No files found.
docs/source/functional.rst
View file @
d35ea80e
...
...
@@ -86,10 +86,6 @@ complex_norm
.. autofunction:: complex_norm
magphase
--------
.. autofunction:: magphase
:hidden:`Filtering`
~~~~~~~~~~~~~~~~~~~
...
...
torchaudio/functional/__init__.py
View file @
d35ea80e
...
...
@@ -12,7 +12,6 @@ from .functional import (
detect_pitch_frequency
,
inverse_spectrogram
,
griffinlim
,
magphase
,
mask_along_axis
,
mask_along_axis_iid
,
mu_law_encoding
,
...
...
@@ -65,7 +64,6 @@ __all__ = [
'DB_to_amplitude'
,
'detect_pitch_frequency'
,
'griffinlim'
,
'magphase'
,
'mask_along_axis'
,
'mask_along_axis_iid'
,
'mu_law_encoding'
,
...
...
torchaudio/functional/functional.py
View file @
d35ea80e
...
...
@@ -30,7 +30,6 @@ __all__ = [
"mu_law_decoding"
,
"complex_norm"
,
"angle"
,
"magphase"
,
"phase_vocoder"
,
'mask_along_axis'
,
'mask_along_axis_iid'
,
...
...
@@ -771,31 +770,6 @@ def angle(
return
torch
.
atan2
(
complex_tensor
[...,
1
],
complex_tensor
[...,
0
])
@
_mod_utils
.
deprecated
(
"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."
,
version
=
"0.11"
,
)
def
magphase
(
complex_tensor
:
Tensor
,
power
:
float
=
1.0
)
->
Tuple
[
Tensor
,
Tensor
]:
r
"""Separate a complex-valued spectrogram with shape `(..., 2)` into its magnitude and phase.
Args:
complex_tensor (Tensor): Tensor shape of `(..., complex=2)`
power (float, optional): Power of the norm. (Default: `1.0`)
Returns:
(Tensor, Tensor): The magnitude and phase of the complex tensor
"""
mag
=
complex_norm
(
complex_tensor
,
power
)
phase
=
angle
(
complex_tensor
)
return
mag
,
phase
def
phase_vocoder
(
complex_specgrams
:
Tensor
,
rate
:
float
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment