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
hehl2
Torchaudio
Commits
f0ab42ce
"vscode:/vscode.git/clone" did not exist on "4d437609e4243b4f394886816d7ec99807974c15"
Unverified
Commit
f0ab42ce
authored
Apr 05, 2021
by
Caroline Chen
Committed by
GitHub
Apr 05, 2021
Browse files
Remove an invalid resample comparison unit test (#1426)
parent
7d034ea7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
19 deletions
+0
-19
test/torchaudio_unittest/functional/librosa_compatibility_test.py
...chaudio_unittest/functional/librosa_compatibility_test.py
+0
-19
No files found.
test/torchaudio_unittest/functional/librosa_compatibility_test.py
View file @
f0ab42ce
...
@@ -111,25 +111,6 @@ class TestFunctional(common_utils.TorchaudioTestCase):
...
@@ -111,25 +111,6 @@ class TestFunctional(common_utils.TorchaudioTestCase):
self
.
assertEqual
(
ta_out
,
lr_out
,
atol
=
5e-5
,
rtol
=
1e-5
)
self
.
assertEqual
(
ta_out
,
lr_out
,
atol
=
5e-5
,
rtol
=
1e-5
)
def
test_resample
(
self
):
input_path
=
common_utils
.
get_asset_path
(
'sinewave.wav'
)
waveform
,
sample_rate
=
common_utils
.
load_wav
(
input_path
)
upsample_rate
=
sample_rate
*
2
downsample_rate
=
sample_rate
//
2
ta_upsampled
=
F
.
resample
(
waveform
,
sample_rate
,
upsample_rate
)
lr_upsampled
=
librosa
.
resample
(
waveform
.
squeeze
(
0
).
numpy
(),
sample_rate
,
upsample_rate
)
lr_upsampled
=
torch
.
from_numpy
(
lr_upsampled
).
unsqueeze
(
0
)
self
.
assertEqual
(
ta_upsampled
,
lr_upsampled
,
atol
=
1e-2
,
rtol
=
1e-5
)
ta_downsampled
=
F
.
resample
(
waveform
,
sample_rate
,
downsample_rate
)
lr_downsampled
=
librosa
.
resample
(
waveform
.
squeeze
(
0
).
numpy
(),
sample_rate
,
downsample_rate
)
lr_downsampled
=
torch
.
from_numpy
(
lr_downsampled
).
unsqueeze
(
0
)
self
.
assertEqual
(
ta_downsampled
,
lr_downsampled
,
atol
=
1e-2
,
rtol
=
1e-5
)
@
unittest
.
skipIf
(
not
LIBROSA_AVAILABLE
,
"Librosa not available"
)
@
unittest
.
skipIf
(
not
LIBROSA_AVAILABLE
,
"Librosa not available"
)
class
TestFunctionalComplex
(
common_utils
.
TorchaudioTestCase
):
class
TestFunctionalComplex
(
common_utils
.
TorchaudioTestCase
):
...
...
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