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
66d3e3fa
Unverified
Commit
66d3e3fa
authored
Apr 20, 2020
by
moto
Committed by
GitHub
Apr 20, 2020
Browse files
Remove unused helper function (#565)
parent
91e59231
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
6 deletions
+0
-6
test/common_utils.py
test/common_utils.py
+0
-6
No files found.
test/common_utils.py
View file @
66d3e3fa
...
@@ -52,12 +52,6 @@ def random_float_tensor(seed, size, a=22695477, c=1, m=2 ** 32):
...
@@ -52,12 +52,6 @@ def random_float_tensor(seed, size, a=22695477, c=1, m=2 ** 32):
return
torch
.
tensor
(
arr
).
float
().
view
(
size
)
/
m
return
torch
.
tensor
(
arr
).
float
().
view
(
size
)
/
m
def
random_int_tensor
(
seed
,
size
,
low
=
0
,
high
=
2
**
32
,
a
=
22695477
,
c
=
1
,
m
=
2
**
32
):
""" Same as random_float_tensor but integers between [low, high)
"""
return
torch
.
floor
(
random_float_tensor
(
seed
,
size
,
a
,
c
,
m
)
*
(
high
-
low
))
+
low
@
contextmanager
@
contextmanager
def
AudioBackendScope
(
new_backend
):
def
AudioBackendScope
(
new_backend
):
previous_backend
=
torchaudio
.
get_audio_backend
()
previous_backend
=
torchaudio
.
get_audio_backend
()
...
...
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