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
b4998409
"git@developer.sourcefind.cn:renzhc/diffusers_dcu.git" did not exist on "d1b2a1a95710964ff84b2c2332cd2ad93734561e"
Unverified
Commit
b4998409
authored
May 04, 2020
by
moto
Committed by
GitHub
May 04, 2020
Browse files
Reduce tolerance for MFCC (#608)
parent
79eecb0f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
2 deletions
+1
-2
test/test_batch_consistency.py
test/test_batch_consistency.py
+1
-2
No files found.
test/test_batch_consistency.py
View file @
b4998409
...
@@ -207,7 +207,6 @@ class TestTransforms(unittest.TestCase):
...
@@ -207,7 +207,6 @@ class TestTransforms(unittest.TestCase):
computed
=
torchaudio
.
transforms
.
MelSpectrogram
()(
waveform
.
repeat
(
3
,
1
,
1
))
computed
=
torchaudio
.
transforms
.
MelSpectrogram
()(
waveform
.
repeat
(
3
,
1
,
1
))
torch
.
testing
.
assert_allclose
(
computed
,
expected
)
torch
.
testing
.
assert_allclose
(
computed
,
expected
)
@
unittest
.
skipIf
(
platform
.
system
()
==
"Windows"
,
"Test is known to fail on Windows."
)
def
test_batch_mfcc
(
self
):
def
test_batch_mfcc
(
self
):
test_filepath
=
common_utils
.
get_asset_path
(
'steam-train-whistle-daniel_simon.wav'
)
test_filepath
=
common_utils
.
get_asset_path
(
'steam-train-whistle-daniel_simon.wav'
)
waveform
,
_
=
torchaudio
.
load
(
test_filepath
)
waveform
,
_
=
torchaudio
.
load
(
test_filepath
)
...
@@ -217,7 +216,7 @@ class TestTransforms(unittest.TestCase):
...
@@ -217,7 +216,7 @@ class TestTransforms(unittest.TestCase):
# Batch then transform
# Batch then transform
computed
=
torchaudio
.
transforms
.
MFCC
()(
waveform
.
repeat
(
3
,
1
,
1
))
computed
=
torchaudio
.
transforms
.
MFCC
()(
waveform
.
repeat
(
3
,
1
,
1
))
torch
.
testing
.
assert_allclose
(
computed
,
expected
,
atol
=
1e-
5
,
rtol
=
1e-5
)
torch
.
testing
.
assert_allclose
(
computed
,
expected
,
atol
=
1e-
4
,
rtol
=
1e-5
)
def
test_batch_TimeStretch
(
self
):
def
test_batch_TimeStretch
(
self
):
test_filepath
=
common_utils
.
get_asset_path
(
'steam-train-whistle-daniel_simon.wav'
)
test_filepath
=
common_utils
.
get_asset_path
(
'steam-train-whistle-daniel_simon.wav'
)
...
...
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