Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
2406892a
Unverified
Commit
2406892a
authored
Sep 01, 2021
by
Anton Lozhkov
Committed by
GitHub
Sep 01, 2021
Browse files
Add `Hubert` to the `AutoFeatureExtractor` (#13366)
* Add Hubert to the auto feature extractor * Fix import structure
parent
6b353264
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
0 deletions
+3
-0
src/transformers/models/auto/feature_extraction_auto.py
src/transformers/models/auto/feature_extraction_auto.py
+1
-0
src/transformers/models/hubert/__init__.py
src/transformers/models/hubert/__init__.py
+2
-0
No files found.
src/transformers/models/auto/feature_extraction_auto.py
View file @
2406892a
...
...
@@ -34,6 +34,7 @@ FEATURE_EXTRACTOR_MAPPING_NAMES = OrderedDict(
[
(
"beit"
,
"BeitFeatureExtractor"
),
(
"deit"
,
"DeiTFeatureExtractor"
),
(
"hubert"
,
"Wav2Vec2FeatureExtractor"
),
(
"speech_to_text"
,
"Speech2TextFeatureExtractor"
),
(
"vit"
,
"ViTFeatureExtractor"
),
(
"wav2vec2"
,
"Wav2Vec2FeatureExtractor"
),
...
...
src/transformers/models/hubert/__init__.py
View file @
2406892a
...
...
@@ -21,6 +21,7 @@ from ...file_utils import _LazyModule, is_tf_available, is_torch_available
_import_structure
=
{
".wav2vec2.feature_extraction_wav2vec2"
:
[
"Wav2Vec2FeatureExtractor"
],
"configuration_hubert"
:
[
"HUBERT_PRETRAINED_CONFIG_ARCHIVE_MAP"
,
"HubertConfig"
],
}
...
...
@@ -43,6 +44,7 @@ if is_tf_available():
]
if
TYPE_CHECKING
:
from
..wav2vec2.feature_extraction_wav2vec2
import
Wav2Vec2FeatureExtractor
from
.configuration_hubert
import
HUBERT_PRETRAINED_CONFIG_ARCHIVE_MAP
,
HubertConfig
if
is_torch_available
():
...
...
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