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
90311ed1
"src/diffusers/schedulers/scheduling_ddim_cogvideox.py" did not exist on "e3568d14bad87927e9db2ee856102c037a719daa"
Unverified
Commit
90311ed1
authored
Apr 05, 2021
by
Krishna Kalyan
Committed by
GitHub
Apr 05, 2021
Browse files
Add Autograd test for T.Resample (#1416)
parent
6a677ac8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
test/torchaudio_unittest/transforms/autograd_test_impl.py
test/torchaudio_unittest/transforms/autograd_test_impl.py
+6
-0
No files found.
test/torchaudio_unittest/transforms/autograd_test_impl.py
View file @
90311ed1
...
@@ -71,3 +71,9 @@ class AutogradTestMixin(TestBaseMixin):
...
@@ -71,3 +71,9 @@ class AutogradTestMixin(TestBaseMixin):
transform
=
T
.
MFCC
(
sample_rate
=
sample_rate
,
log_mels
=
log_mels
)
transform
=
T
.
MFCC
(
sample_rate
=
sample_rate
,
log_mels
=
log_mels
)
waveform
=
get_whitenoise
(
sample_rate
=
sample_rate
,
duration
=
0.05
,
n_channels
=
2
)
waveform
=
get_whitenoise
(
sample_rate
=
sample_rate
,
duration
=
0.05
,
n_channels
=
2
)
self
.
assert_grad
(
transform
,
[
waveform
])
self
.
assert_grad
(
transform
,
[
waveform
])
@
parameterized
.
expand
([(
8000
,
8000
),
(
8000
,
4000
),
(
4000
,
8000
)])
def
test_resample
(
self
,
orig_freq
,
new_freq
):
transform
=
T
.
Resample
(
orig_freq
=
orig_freq
,
new_freq
=
new_freq
)
waveform
=
get_whitenoise
(
sample_rate
=
8000
,
duration
=
0.05
,
n_channels
=
2
)
self
.
assert_grad
(
transform
,
[
waveform
])
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