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
7212f245
"vscode:/vscode.git/clone" did not exist on "5a65066922ce28dbc202dc03bb2410da14b980d2"
Commit
7212f245
authored
Mar 06, 2019
by
thirdformant
Committed by
Soumith Chintala
Mar 06, 2019
Browse files
Bug fix: if top_db is None then checking `top_db < 0` fails (#85)
parent
11486f78
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
torchaudio/transforms.py
torchaudio/transforms.py
+1
-1
No files found.
torchaudio/transforms.py
View file @
7212f245
...
...
@@ -293,7 +293,7 @@ class SpectrogramToDB(object):
"""
def
__init__
(
self
,
stype
=
"power"
,
top_db
=
None
):
self
.
stype
=
stype
if
top_db
<
0
:
if
top_db
is
not
None
and
top_db
<
0
:
raise
ValueError
(
'top_db must be positive value'
)
self
.
top_db
=
top_db
self
.
multiplier
=
10.
if
stype
==
"power"
else
20.
...
...
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