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
ec2323ce
"tests/graph_index/test_hetero.py.bak" did not exist on "52d4535b61cd82bc82a1ebb79d8dc66c5c50856e"
Unverified
Commit
ec2323ce
authored
Jul 29, 2020
by
moto
Committed by
GitHub
Jul 29, 2020
Browse files
Fix seed of yesno dataset test (#832)
parent
4253efe2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
test/datasets/yesno_test.py
test/datasets/yesno_test.py
+2
-2
No files found.
test/datasets/yesno_test.py
View file @
ec2323ce
...
...
@@ -29,10 +29,10 @@ class TestYesNo(TempDirMixin, TorchaudioTestCase):
cls
.
root_dir
=
cls
.
get_base_temp_dir
()
base_dir
=
os
.
path
.
join
(
cls
.
root_dir
,
'waves_yesno'
)
os
.
makedirs
(
base_dir
,
exist_ok
=
True
)
for
label
in
cls
.
labels
:
for
i
,
label
in
enumerate
(
cls
.
labels
)
:
filename
=
f
'
{
"_"
.
join
(
str
(
l
)
for
l
in
label
)
}
.wav'
path
=
os
.
path
.
join
(
base_dir
,
filename
)
data
=
get_whitenoise
(
sample_rate
=
8000
,
duration
=
6
,
n_channels
=
1
,
dtype
=
'int16'
)
data
=
get_whitenoise
(
sample_rate
=
8000
,
duration
=
6
,
n_channels
=
1
,
dtype
=
'int16'
,
seed
=
i
)
save_wav
(
path
,
data
,
8000
)
cls
.
data
.
append
(
normalize_wav
(
data
))
...
...
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