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
d1d6dbc6
"...git@developer.sourcefind.cn:OpenDAS/llama-factory.git" did not exist on "849877159ac0c6cc6397decc31e2b1073d765950"
Unverified
Commit
d1d6dbc6
authored
Jul 27, 2021
by
Zack Kneupper
Committed by
GitHub
Jul 27, 2021
Browse files
Simplify axis value checks (#1501)
parent
d49e6e45
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
torchaudio/functional/functional.py
torchaudio/functional/functional.py
+2
-2
No files found.
torchaudio/functional/functional.py
View file @
d1d6dbc6
...
...
@@ -732,7 +732,7 @@ def mask_along_axis_iid(
Tensor: Masked spectrograms of dimensions (batch, channel, freq, time)
"""
if
axis
!=
2
and
axis
!=
3
:
if
axis
not
in
[
2
,
3
]
:
raise
ValueError
(
'Only Frequency and Time masking are supported'
)
device
=
specgrams
.
device
...
...
@@ -774,7 +774,7 @@ def mask_along_axis(
Returns:
Tensor: Masked spectrogram of dimensions (channel, freq, time)
"""
if
axis
!=
1
and
axis
!=
2
:
if
axis
not
in
[
1
,
2
]
:
raise
ValueError
(
'Only Frequency and Time masking are supported'
)
# pack batch
...
...
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