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
chenpangpang
transformers
Commits
ee3be053
Unverified
Commit
ee3be053
authored
May 15, 2023
by
LWprogramming
Committed by
GitHub
May 15, 2023
Browse files
Fix test typos - audio feature extractors (#23310)
parent
8f76dc8e
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
tests/models/mctct/test_feature_extraction_mctct.py
tests/models/mctct/test_feature_extraction_mctct.py
+2
-2
tests/models/speecht5/test_feature_extraction_speecht5.py
tests/models/speecht5/test_feature_extraction_speecht5.py
+2
-2
tests/models/tvlt/test_feature_extraction_tvlt.py
tests/models/tvlt/test_feature_extraction_tvlt.py
+1
-1
No files found.
tests/models/mctct/test_feature_extraction_mctct.py
View file @
ee3be053
...
@@ -114,8 +114,8 @@ class MCTCTFeatureExtractionTest(SequenceFeatureExtractionTestMixin, unittest.Te
...
@@ -114,8 +114,8 @@ class MCTCTFeatureExtractionTest(SequenceFeatureExtractionTestMixin, unittest.Te
def
test_call
(
self
):
def
test_call
(
self
):
# Tests that all call wrap to encode_plus and batch_encode_plus
# Tests that all call wrap to encode_plus and batch_encode_plus
feature_extractor
=
self
.
feature_extraction_class
(
**
self
.
feat_extract_tester
.
prepare_feat_extract_dict
())
feature_extractor
=
self
.
feature_extraction_class
(
**
self
.
feat_extract_tester
.
prepare_feat_extract_dict
())
# create three inputs of length 800, 1000, and 1200
0
# create three inputs of length 800, 1000, and 1200
speech_inputs
=
[
floats_list
((
1
,
x
))[
0
]
for
x
in
range
(
800
0
,
1400
0
,
200
0
)]
speech_inputs
=
[
floats_list
((
1
,
x
))[
0
]
for
x
in
range
(
800
,
1400
,
200
)]
np_speech_inputs
=
[
np
.
asarray
(
speech_input
)
for
speech_input
in
speech_inputs
]
np_speech_inputs
=
[
np
.
asarray
(
speech_input
)
for
speech_input
in
speech_inputs
]
# Test feature size
# Test feature size
...
...
tests/models/speecht5/test_feature_extraction_speecht5.py
View file @
ee3be053
...
@@ -255,8 +255,8 @@ class SpeechT5FeatureExtractionTest(SequenceFeatureExtractionTestMixin, unittest
...
@@ -255,8 +255,8 @@ class SpeechT5FeatureExtractionTest(SequenceFeatureExtractionTestMixin, unittest
def
test_call_target
(
self
):
def
test_call_target
(
self
):
# Tests that all call wrap to encode_plus and batch_encode_plus
# Tests that all call wrap to encode_plus and batch_encode_plus
feature_extractor
=
self
.
feature_extraction_class
(
**
self
.
feat_extract_tester
.
prepare_feat_extract_dict
())
feature_extractor
=
self
.
feature_extraction_class
(
**
self
.
feat_extract_tester
.
prepare_feat_extract_dict
())
# create three inputs of length 800
0
, 1
4
000, and 2
0
00
# create three inputs of length 800, 1000, and
1
200
speech_inputs
=
[
floats_list
((
1
,
x
))[
0
]
for
x
in
range
(
800
0
,
1400
0
,
200
0
)]
speech_inputs
=
[
floats_list
((
1
,
x
))[
0
]
for
x
in
range
(
800
,
1400
,
200
)]
np_speech_inputs
=
[
np
.
asarray
(
speech_input
)
for
speech_input
in
speech_inputs
]
np_speech_inputs
=
[
np
.
asarray
(
speech_input
)
for
speech_input
in
speech_inputs
]
# Test feature size
# Test feature size
...
...
tests/models/tvlt/test_feature_extraction_tvlt.py
View file @
ee3be053
...
@@ -160,7 +160,7 @@ class TvltFeatureExtractionTest(SequenceFeatureExtractionTestMixin, unittest.Tes
...
@@ -160,7 +160,7 @@ class TvltFeatureExtractionTest(SequenceFeatureExtractionTestMixin, unittest.Tes
feature_extractor
=
self
.
feature_extraction_class
(
**
self
.
feat_extract_dict
)
feature_extractor
=
self
.
feature_extraction_class
(
**
self
.
feat_extract_dict
)
# create three inputs of length 800, 1000, and 1200
# create three inputs of length 800, 1000, and 1200
speech_inputs
=
[
floats_list
((
1
,
x
))[
0
]
for
x
in
range
(
800
0
,
1400
0
,
200
00
)]
speech_inputs
=
[
floats_list
((
1
,
x
))[
0
]
for
x
in
range
(
800
,
1400
,
200
)]
np_speech_inputs
=
[
np
.
asarray
(
speech_input
)
for
speech_input
in
speech_inputs
]
np_speech_inputs
=
[
np
.
asarray
(
speech_input
)
for
speech_input
in
speech_inputs
]
# Test not batched input
# Test not batched input
...
...
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