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
a106bde5
Unverified
Commit
a106bde5
authored
Mar 01, 2021
by
Suraj Patil
Committed by
GitHub
Mar 01, 2021
Browse files
[Wav2Vec2FeatureExtractor] smal fixes (#10455)
* smal fixes * don't check for None
parent
11655faf
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
src/transformers/models/wav2vec2/feature_extraction_wav2vec2.py
...ansformers/models/wav2vec2/feature_extraction_wav2vec2.py
+3
-2
No files found.
src/transformers/models/wav2vec2/feature_extraction_wav2vec2.py
View file @
a106bde5
...
@@ -47,7 +47,7 @@ class Wav2Vec2FeatureExtractor(PreTrainedFeatureExtractor):
...
@@ -47,7 +47,7 @@ class Wav2Vec2FeatureExtractor(PreTrainedFeatureExtractor):
improve the performance for some models, *e.g.*, `wav2vec2-lv60
improve the performance for some models, *e.g.*, `wav2vec2-lv60
<https://huggingface.co/models?search=lv60>`__.
<https://huggingface.co/models?search=lv60>`__.
return_attention_mask (:obj:`bool`, `optional`, defaults to :obj:`False`):
return_attention_mask (:obj:`bool`, `optional`, defaults to :obj:`False`):
Whether or not :meth:`~transformers.Wav2Vec2
Tokenize
r.__call__` should return :obj:`attention_mask`.
Whether or not :meth:`~transformers.Wav2Vec2
FeatureExtracto
r.__call__` should return :obj:`attention_mask`.
.. note::
.. note::
...
@@ -89,6 +89,7 @@ class Wav2Vec2FeatureExtractor(PreTrainedFeatureExtractor):
...
@@ -89,6 +89,7 @@ class Wav2Vec2FeatureExtractor(PreTrainedFeatureExtractor):
padding
:
Union
[
bool
,
str
,
PaddingStrategy
]
=
False
,
padding
:
Union
[
bool
,
str
,
PaddingStrategy
]
=
False
,
max_length
:
Optional
[
int
]
=
None
,
max_length
:
Optional
[
int
]
=
None
,
pad_to_multiple_of
:
Optional
[
int
]
=
None
,
pad_to_multiple_of
:
Optional
[
int
]
=
None
,
return_attention_mask
:
Optional
[
bool
]
=
None
,
return_tensors
:
Optional
[
Union
[
str
,
TensorType
]]
=
None
,
return_tensors
:
Optional
[
Union
[
str
,
TensorType
]]
=
None
,
sampling_rate
:
Optional
[
int
]
=
None
,
sampling_rate
:
Optional
[
int
]
=
None
,
**
kwargs
**
kwargs
...
@@ -185,7 +186,7 @@ class Wav2Vec2FeatureExtractor(PreTrainedFeatureExtractor):
...
@@ -185,7 +186,7 @@ class Wav2Vec2FeatureExtractor(PreTrainedFeatureExtractor):
padding
=
padding
,
padding
=
padding
,
max_length
=
max_length
,
max_length
=
max_length
,
pad_to_multiple_of
=
pad_to_multiple_of
,
pad_to_multiple_of
=
pad_to_multiple_of
,
return_attention_mask
=
self
.
return_attention_mask
,
return_attention_mask
=
return_attention_mask
,
return_tensors
=
return_tensors
,
return_tensors
=
return_tensors
,
)
)
...
...
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