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
60a5b273
Unverified
Commit
60a5b273
authored
Apr 09, 2020
by
moto
Committed by
GitHub
Apr 09, 2020
Browse files
Set manual seed in mask_along_axis_iid (#529)
parent
d41d30ab
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
test/test_functional.py
test/test_functional.py
+3
-4
No files found.
test/test_functional.py
View file @
60a5b273
...
@@ -361,13 +361,12 @@ def test_mask_along_axis(specgram, mask_param, mask_value, axis):
...
@@ -361,13 +361,12 @@ def test_mask_along_axis(specgram, mask_param, mask_value, axis):
assert
num_masked_columns
<
mask_param
assert
num_masked_columns
<
mask_param
@
pytest
.
mark
.
parametrize
(
'specgrams'
,
[
torch
.
randn
(
4
,
2
,
1025
,
400
),
])
@
pytest
.
mark
.
parametrize
(
'mask_param'
,
[
100
])
@
pytest
.
mark
.
parametrize
(
'mask_param'
,
[
100
])
@
pytest
.
mark
.
parametrize
(
'mask_value'
,
[
0.
,
30.
])
@
pytest
.
mark
.
parametrize
(
'mask_value'
,
[
0.
,
30.
])
@
pytest
.
mark
.
parametrize
(
'axis'
,
[
2
,
3
])
@
pytest
.
mark
.
parametrize
(
'axis'
,
[
2
,
3
])
def
test_mask_along_axis_iid
(
specgrams
,
mask_param
,
mask_value
,
axis
):
def
test_mask_along_axis_iid
(
mask_param
,
mask_value
,
axis
):
torch
.
random
.
manual_seed
(
42
)
specgrams
=
torch
.
randn
(
4
,
2
,
1025
,
400
)
mask_specgrams
=
F
.
mask_along_axis_iid
(
specgrams
,
mask_param
,
mask_value
,
axis
)
mask_specgrams
=
F
.
mask_along_axis_iid
(
specgrams
,
mask_param
,
mask_value
,
axis
)
...
...
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