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
088c1880
Unverified
Commit
088c1880
authored
Mar 25, 2022
by
Sylvain Gugger
Committed by
GitHub
Mar 25, 2022
Browse files
Big file_utils cleanup (#16396)
* Big file_utils cleanup * This one still needs to be treated separately
parent
2b23e080
Changes
222
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
50 additions
and
50 deletions
+50
-50
src/transformers/models/blenderbot/modeling_flax_blenderbot.py
...ransformers/models/blenderbot/modeling_flax_blenderbot.py
+3
-3
src/transformers/models/blenderbot/modeling_tf_blenderbot.py
src/transformers/models/blenderbot/modeling_tf_blenderbot.py
+6
-6
src/transformers/models/blenderbot_small/modeling_blenderbot_small.py
...mers/models/blenderbot_small/modeling_blenderbot_small.py
+4
-4
src/transformers/models/blenderbot_small/modeling_flax_blenderbot_small.py
...models/blenderbot_small/modeling_flax_blenderbot_small.py
+3
-3
src/transformers/models/blenderbot_small/modeling_tf_blenderbot_small.py
...s/models/blenderbot_small/modeling_tf_blenderbot_small.py
+6
-6
src/transformers/models/canine/modeling_canine.py
src/transformers/models/canine/modeling_canine.py
+1
-1
src/transformers/models/clip/feature_extraction_clip.py
src/transformers/models/clip/feature_extraction_clip.py
+1
-1
src/transformers/models/clip/modeling_clip.py
src/transformers/models/clip/modeling_clip.py
+4
-4
src/transformers/models/clip/modeling_flax_clip.py
src/transformers/models/clip/modeling_flax_clip.py
+3
-3
src/transformers/models/clip/modeling_tf_clip.py
src/transformers/models/clip/modeling_tf_clip.py
+6
-6
src/transformers/models/clip/processing_clip.py
src/transformers/models/clip/processing_clip.py
+1
-1
src/transformers/models/convbert/modeling_convbert.py
src/transformers/models/convbert/modeling_convbert.py
+1
-1
src/transformers/models/convbert/modeling_tf_convbert.py
src/transformers/models/convbert/modeling_tf_convbert.py
+2
-2
src/transformers/models/convnext/feature_extraction_convnext.py
...ansformers/models/convnext/feature_extraction_convnext.py
+1
-1
src/transformers/models/convnext/modeling_convnext.py
src/transformers/models/convnext/modeling_convnext.py
+1
-1
src/transformers/models/convnext/modeling_tf_convnext.py
src/transformers/models/convnext/modeling_tf_convnext.py
+2
-2
src/transformers/models/ctrl/modeling_ctrl.py
src/transformers/models/ctrl/modeling_ctrl.py
+1
-1
src/transformers/models/ctrl/modeling_tf_ctrl.py
src/transformers/models/ctrl/modeling_tf_ctrl.py
+2
-2
src/transformers/models/data2vec/modeling_data2vec_audio.py
src/transformers/models/data2vec/modeling_data2vec_audio.py
+1
-1
src/transformers/models/data2vec/modeling_data2vec_text.py
src/transformers/models/data2vec/modeling_data2vec_text.py
+1
-1
No files found.
src/transformers/models/blenderbot/modeling_flax_blenderbot.py
View file @
088c1880
...
@@ -124,7 +124,7 @@ BLENDERBOT_INPUTS_DOCSTRING = r"""
...
@@ -124,7 +124,7 @@ BLENDERBOT_INPUTS_DOCSTRING = r"""
Whether or not to return the hidden states of all layers. See `hidden_states` under returned tensors for
Whether or not to return the hidden states of all layers. See `hidden_states` under returned tensors for
more detail.
more detail.
return_dict (`bool`, *optional*):
return_dict (`bool`, *optional*):
Whether or not to return a [`~
file_
utils.ModelOutput`] instead of a plain tuple.
Whether or not to return a [`~utils.ModelOutput`] instead of a plain tuple.
"""
"""
...
@@ -155,7 +155,7 @@ BLENDERBOT_ENCODE_INPUTS_DOCSTRING = r"""
...
@@ -155,7 +155,7 @@ BLENDERBOT_ENCODE_INPUTS_DOCSTRING = r"""
Whether or not to return the hidden states of all layers. See `hidden_states` under returned tensors for
Whether or not to return the hidden states of all layers. See `hidden_states` under returned tensors for
more detail.
more detail.
return_dict (`bool`, *optional*):
return_dict (`bool`, *optional*):
Whether or not to return a [`~
file_
utils.ModelOutput`] instead of a plain tuple.
Whether or not to return a [`~utils.ModelOutput`] instead of a plain tuple.
"""
"""
BLENDERBOT_DECODE_INPUTS_DOCSTRING
=
r
"""
BLENDERBOT_DECODE_INPUTS_DOCSTRING
=
r
"""
...
@@ -201,7 +201,7 @@ BLENDERBOT_DECODE_INPUTS_DOCSTRING = r"""
...
@@ -201,7 +201,7 @@ BLENDERBOT_DECODE_INPUTS_DOCSTRING = r"""
Whether or not to return the hidden states of all layers. See `hidden_states` under returned tensors for
Whether or not to return the hidden states of all layers. See `hidden_states` under returned tensors for
more detail.
more detail.
return_dict (`bool`, *optional*):
return_dict (`bool`, *optional*):
Whether or not to return a [`~
file_
utils.ModelOutput`] instead of a plain tuple.
Whether or not to return a [`~utils.ModelOutput`] instead of a plain tuple.
"""
"""
...
...
src/transformers/models/blenderbot/modeling_tf_blenderbot.py
View file @
088c1880
...
@@ -608,8 +608,8 @@ BLENDERBOT_INPUTS_DOCSTRING = r"""
...
@@ -608,8 +608,8 @@ BLENDERBOT_INPUTS_DOCSTRING = r"""
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.
used instead.
return_dict (`bool`, *optional*):
return_dict (`bool`, *optional*):
Whether or not to return a [`~
file_
utils.ModelOutput`] instead of a plain tuple. This argument can be used
Whether or not to return a [`~utils.ModelOutput`] instead of a plain tuple. This argument can be used
in
in
eager mode, in graph mode the value will always be set to True.
eager mode, in graph mode the value will always be set to True.
training (`bool`, *optional*, defaults to `False`):
training (`bool`, *optional*, defaults to `False`):
Whether or not to use the model in training mode (some modules like dropout modules have different
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).
behaviors between training and evaluation).
...
@@ -700,8 +700,8 @@ class TFBlenderbotEncoder(tf.keras.layers.Layer):
...
@@ -700,8 +700,8 @@ class TFBlenderbotEncoder(tf.keras.layers.Layer):
for more detail. This argument can be used only in eager mode, in graph mode the value in the config
for more detail. This argument can be used only in eager mode, in graph mode the value in the config
will be used instead.
will be used instead.
return_dict (`bool`, *optional*):
return_dict (`bool`, *optional*):
Whether or not to return a [`~
file_
utils.ModelOutput`] instead of a plain tuple. This argument can be
Whether or not to return a [`~utils.ModelOutput`] instead of a plain tuple. This argument can be
used
used
in eager mode, in graph mode the value will always be set to True.
in eager mode, in graph mode the value will always be set to True.
training (`bool`, *optional*, defaults to `False`):
training (`bool`, *optional*, defaults to `False`):
Whether or not to use the model in training mode (some modules like dropout modules have different
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).
behaviors between training and evaluation).
...
@@ -885,8 +885,8 @@ class TFBlenderbotDecoder(tf.keras.layers.Layer):
...
@@ -885,8 +885,8 @@ class TFBlenderbotDecoder(tf.keras.layers.Layer):
for more detail. This argument can be used only in eager mode, in graph mode the value in the config
for more detail. This argument can be used only in eager mode, in graph mode the value in the config
will be used instead.
will be used instead.
return_dict (`bool`, *optional*):
return_dict (`bool`, *optional*):
Whether or not to return a [`~
file_
utils.ModelOutput`] instead of a plain tuple. This argument can be
Whether or not to return a [`~utils.ModelOutput`] instead of a plain tuple. This argument can be
used
used
in eager mode, in graph mode the value will always be set to True.
in eager mode, in graph mode the value will always be set to True.
training (`bool`, *optional*, defaults to `False`):
training (`bool`, *optional*, defaults to `False`):
Whether or not to use the model in training mode (some modules like dropout modules have different
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).
behaviors between training and evaluation).
...
...
src/transformers/models/blenderbot_small/modeling_blenderbot_small.py
View file @
088c1880
...
@@ -623,7 +623,7 @@ BLENDERBOT_SMALL_INPUTS_DOCSTRING = r"""
...
@@ -623,7 +623,7 @@ BLENDERBOT_SMALL_INPUTS_DOCSTRING = r"""
Whether or not to return the hidden states of all layers. See `hidden_states` under returned tensors for
Whether or not to return the hidden states of all layers. See `hidden_states` under returned tensors for
more detail.
more detail.
return_dict (`bool`, *optional*):
return_dict (`bool`, *optional*):
Whether or not to return a [`~
file_
utils.ModelOutput`] instead of a plain tuple.
Whether or not to return a [`~utils.ModelOutput`] instead of a plain tuple.
"""
"""
...
@@ -708,7 +708,7 @@ class BlenderbotSmallEncoder(BlenderbotSmallPreTrainedModel):
...
@@ -708,7 +708,7 @@ class BlenderbotSmallEncoder(BlenderbotSmallPreTrainedModel):
Whether or not to return the hidden states of all layers. See `hidden_states` under returned tensors
Whether or not to return the hidden states of all layers. See `hidden_states` under returned tensors
for more detail.
for more detail.
return_dict (`bool`, *optional*):
return_dict (`bool`, *optional*):
Whether or not to return a [`~
file_
utils.ModelOutput`] instead of a plain tuple.
Whether or not to return a [`~utils.ModelOutput`] instead of a plain tuple.
"""
"""
output_attentions
=
output_attentions
if
output_attentions
is
not
None
else
self
.
config
.
output_attentions
output_attentions
=
output_attentions
if
output_attentions
is
not
None
else
self
.
config
.
output_attentions
output_hidden_states
=
(
output_hidden_states
=
(
...
@@ -930,7 +930,7 @@ class BlenderbotSmallDecoder(BlenderbotSmallPreTrainedModel):
...
@@ -930,7 +930,7 @@ class BlenderbotSmallDecoder(BlenderbotSmallPreTrainedModel):
Whether or not to return the hidden states of all layers. See `hidden_states` under returned tensors
Whether or not to return the hidden states of all layers. See `hidden_states` under returned tensors
for more detail.
for more detail.
return_dict (`bool`, *optional*):
return_dict (`bool`, *optional*):
Whether or not to return a [`~
file_
utils.ModelOutput`] instead of a plain tuple.
Whether or not to return a [`~utils.ModelOutput`] instead of a plain tuple.
"""
"""
output_attentions
=
output_attentions
if
output_attentions
is
not
None
else
self
.
config
.
output_attentions
output_attentions
=
output_attentions
if
output_attentions
is
not
None
else
self
.
config
.
output_attentions
output_hidden_states
=
(
output_hidden_states
=
(
...
@@ -1489,7 +1489,7 @@ class BlenderbotSmallForCausalLM(BlenderbotSmallPreTrainedModel):
...
@@ -1489,7 +1489,7 @@ class BlenderbotSmallForCausalLM(BlenderbotSmallPreTrainedModel):
Whether or not to return the hidden states of all layers. See `hidden_states` under returned tensors
Whether or not to return the hidden states of all layers. See `hidden_states` under returned tensors
for more detail.
for more detail.
return_dict (`bool`, *optional*):
return_dict (`bool`, *optional*):
Whether or not to return a [`~
file_
utils.ModelOutput`] instead of a plain tuple.
Whether or not to return a [`~utils.ModelOutput`] instead of a plain tuple.
Returns:
Returns:
...
...
src/transformers/models/blenderbot_small/modeling_flax_blenderbot_small.py
View file @
088c1880
...
@@ -136,7 +136,7 @@ BLENDERBOT_SMALL_INPUTS_DOCSTRING = r"""
...
@@ -136,7 +136,7 @@ BLENDERBOT_SMALL_INPUTS_DOCSTRING = r"""
Whether or not to return the hidden states of all layers. See `hidden_states` under returned tensors for
Whether or not to return the hidden states of all layers. See `hidden_states` under returned tensors for
more detail.
more detail.
return_dict (`bool`, *optional*):
return_dict (`bool`, *optional*):
Whether or not to return a [`~
file_
utils.ModelOutput`] instead of a plain tuple.
Whether or not to return a [`~utils.ModelOutput`] instead of a plain tuple.
"""
"""
...
@@ -167,7 +167,7 @@ BLENDERBOT_SMALL_ENCODE_INPUTS_DOCSTRING = r"""
...
@@ -167,7 +167,7 @@ BLENDERBOT_SMALL_ENCODE_INPUTS_DOCSTRING = r"""
Whether or not to return the hidden states of all layers. See `hidden_states` under returned tensors for
Whether or not to return the hidden states of all layers. See `hidden_states` under returned tensors for
more detail.
more detail.
return_dict (`bool`, *optional*):
return_dict (`bool`, *optional*):
Whether or not to return a [`~
file_
utils.ModelOutput`] instead of a plain tuple.
Whether or not to return a [`~utils.ModelOutput`] instead of a plain tuple.
"""
"""
BLENDERBOT_SMALL_DECODE_INPUTS_DOCSTRING
=
r
"""
BLENDERBOT_SMALL_DECODE_INPUTS_DOCSTRING
=
r
"""
...
@@ -213,7 +213,7 @@ BLENDERBOT_SMALL_DECODE_INPUTS_DOCSTRING = r"""
...
@@ -213,7 +213,7 @@ BLENDERBOT_SMALL_DECODE_INPUTS_DOCSTRING = r"""
Whether or not to return the hidden states of all layers. See `hidden_states` under returned tensors for
Whether or not to return the hidden states of all layers. See `hidden_states` under returned tensors for
more detail.
more detail.
return_dict (`bool`, *optional*):
return_dict (`bool`, *optional*):
Whether or not to return a [`~
file_
utils.ModelOutput`] instead of a plain tuple.
Whether or not to return a [`~utils.ModelOutput`] instead of a plain tuple.
"""
"""
...
...
src/transformers/models/blenderbot_small/modeling_tf_blenderbot_small.py
View file @
088c1880
...
@@ -613,8 +613,8 @@ BLENDERBOT_SMALL_INPUTS_DOCSTRING = r"""
...
@@ -613,8 +613,8 @@ BLENDERBOT_SMALL_INPUTS_DOCSTRING = r"""
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.
used instead.
return_dict (`bool`, *optional*):
return_dict (`bool`, *optional*):
Whether or not to return a [`~
file_
utils.ModelOutput`] instead of a plain tuple. This argument can be used
Whether or not to return a [`~utils.ModelOutput`] instead of a plain tuple. This argument can be used
in
in
eager mode, in graph mode the value will always be set to True.
eager mode, in graph mode the value will always be set to True.
training (`bool`, *optional*, defaults to `False`):
training (`bool`, *optional*, defaults to `False`):
Whether or not to use the model in training mode (some modules like dropout modules have different
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).
behaviors between training and evaluation).
...
@@ -705,8 +705,8 @@ class TFBlenderbotSmallEncoder(tf.keras.layers.Layer):
...
@@ -705,8 +705,8 @@ class TFBlenderbotSmallEncoder(tf.keras.layers.Layer):
for more detail. This argument can be used only in eager mode, in graph mode the value in the config
for more detail. This argument can be used only in eager mode, in graph mode the value in the config
will be used instead.
will be used instead.
return_dict (`bool`, *optional*):
return_dict (`bool`, *optional*):
Whether or not to return a [`~
file_
utils.ModelOutput`] instead of a plain tuple. This argument can be
Whether or not to return a [`~utils.ModelOutput`] instead of a plain tuple. This argument can be
used
used
in eager mode, in graph mode the value will always be set to True.
in eager mode, in graph mode the value will always be set to True.
training (`bool`, *optional*, defaults to `False`):
training (`bool`, *optional*, defaults to `False`):
Whether or not to use the model in training mode (some modules like dropout modules have different
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).
behaviors between training and evaluation).
...
@@ -889,8 +889,8 @@ class TFBlenderbotSmallDecoder(tf.keras.layers.Layer):
...
@@ -889,8 +889,8 @@ class TFBlenderbotSmallDecoder(tf.keras.layers.Layer):
for more detail. This argument can be used only in eager mode, in graph mode the value in the config
for more detail. This argument can be used only in eager mode, in graph mode the value in the config
will be used instead.
will be used instead.
return_dict (`bool`, *optional*):
return_dict (`bool`, *optional*):
Whether or not to return a [`~
file_
utils.ModelOutput`] instead of a plain tuple. This argument can be
Whether or not to return a [`~utils.ModelOutput`] instead of a plain tuple. This argument can be
used
used
in eager mode, in graph mode the value will always be set to True.
in eager mode, in graph mode the value will always be set to True.
training (`bool`, *optional*, defaults to `False`):
training (`bool`, *optional*, defaults to `False`):
Whether or not to use the model in training mode (some modules like dropout modules have different
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).
behaviors between training and evaluation).
...
...
src/transformers/models/canine/modeling_canine.py
View file @
088c1880
...
@@ -975,7 +975,7 @@ CANINE_INPUTS_DOCSTRING = r"""
...
@@ -975,7 +975,7 @@ CANINE_INPUTS_DOCSTRING = r"""
Whether or not to return the hidden states of all layers. See `hidden_states` under returned tensors for
Whether or not to return the hidden states of all layers. See `hidden_states` under returned tensors for
more detail.
more detail.
return_dict (`bool`, *optional*):
return_dict (`bool`, *optional*):
Whether or not to return a [`~
file_
utils.ModelOutput`] instead of a plain tuple.
Whether or not to return a [`~utils.ModelOutput`] instead of a plain tuple.
"""
"""
...
...
src/transformers/models/clip/feature_extraction_clip.py
View file @
088c1880
...
@@ -104,7 +104,7 @@ class CLIPFeatureExtractor(FeatureExtractionMixin, ImageFeatureExtractionMixin):
...
@@ -104,7 +104,7 @@ class CLIPFeatureExtractor(FeatureExtractionMixin, ImageFeatureExtractionMixin):
tensor. In case of a NumPy array/PyTorch tensor, each image should be of shape (C, H, W), where C is a
tensor. In case of a NumPy array/PyTorch tensor, each image should be of shape (C, H, W), where C is a
number of channels, H and W are image height and width.
number of channels, H and W are image height and width.
return_tensors (`str` or [`~
file_
utils.TensorType`], *optional*, defaults to `'np'`):
return_tensors (`str` or [`~utils.TensorType`], *optional*, defaults to `'np'`):
If set, will return tensors of a particular framework. Acceptable values are:
If set, will return tensors of a particular framework. Acceptable values are:
- `'tf'`: Return TensorFlow `tf.constant` objects.
- `'tf'`: Return TensorFlow `tf.constant` objects.
...
...
src/transformers/models/clip/modeling_clip.py
View file @
088c1880
...
@@ -433,7 +433,7 @@ CLIP_TEXT_INPUTS_DOCSTRING = r"""
...
@@ -433,7 +433,7 @@ CLIP_TEXT_INPUTS_DOCSTRING = r"""
Whether or not to return the hidden states of all layers. See `hidden_states` under returned tensors for
Whether or not to return the hidden states of all layers. See `hidden_states` under returned tensors for
more detail.
more detail.
return_dict (`bool`, *optional*):
return_dict (`bool`, *optional*):
Whether or not to return a [`~
file_
utils.ModelOutput`] instead of a plain tuple.
Whether or not to return a [`~utils.ModelOutput`] instead of a plain tuple.
"""
"""
CLIP_VISION_INPUTS_DOCSTRING
=
r
"""
CLIP_VISION_INPUTS_DOCSTRING
=
r
"""
...
@@ -448,7 +448,7 @@ CLIP_VISION_INPUTS_DOCSTRING = r"""
...
@@ -448,7 +448,7 @@ CLIP_VISION_INPUTS_DOCSTRING = r"""
Whether or not to return the hidden states of all layers. See `hidden_states` under returned tensors for
Whether or not to return the hidden states of all layers. See `hidden_states` under returned tensors for
more detail.
more detail.
return_dict (`bool`, *optional*):
return_dict (`bool`, *optional*):
Whether or not to return a [`~
file_
utils.ModelOutput`] instead of a plain tuple.
Whether or not to return a [`~utils.ModelOutput`] instead of a plain tuple.
"""
"""
CLIP_INPUTS_DOCSTRING
=
r
"""
CLIP_INPUTS_DOCSTRING
=
r
"""
...
@@ -485,7 +485,7 @@ CLIP_INPUTS_DOCSTRING = r"""
...
@@ -485,7 +485,7 @@ CLIP_INPUTS_DOCSTRING = r"""
Whether or not to return the hidden states of all layers. See `hidden_states` under returned tensors for
Whether or not to return the hidden states of all layers. See `hidden_states` under returned tensors for
more detail.
more detail.
return_dict (`bool`, *optional*):
return_dict (`bool`, *optional*):
Whether or not to return a [`~
file_
utils.ModelOutput`] instead of a plain tuple.
Whether or not to return a [`~utils.ModelOutput`] instead of a plain tuple.
"""
"""
...
@@ -540,7 +540,7 @@ class CLIPEncoder(nn.Module):
...
@@ -540,7 +540,7 @@ class CLIPEncoder(nn.Module):
Whether or not to return the hidden states of all layers. See `hidden_states` under returned tensors
Whether or not to return the hidden states of all layers. See `hidden_states` under returned tensors
for more detail.
for more detail.
return_dict (`bool`, *optional*):
return_dict (`bool`, *optional*):
Whether or not to return a [`~
file_
utils.ModelOutput`] instead of a plain tuple.
Whether or not to return a [`~utils.ModelOutput`] instead of a plain tuple.
"""
"""
output_attentions
=
output_attentions
if
output_attentions
is
not
None
else
self
.
config
.
output_attentions
output_attentions
=
output_attentions
if
output_attentions
is
not
None
else
self
.
config
.
output_attentions
output_hidden_states
=
(
output_hidden_states
=
(
...
...
src/transformers/models/clip/modeling_flax_clip.py
View file @
088c1880
...
@@ -100,7 +100,7 @@ CLIP_TEXT_INPUTS_DOCSTRING = r"""
...
@@ -100,7 +100,7 @@ CLIP_TEXT_INPUTS_DOCSTRING = r"""
Whether or not to return the hidden states of all layers. See `hidden_states` under returned tensors for
Whether or not to return the hidden states of all layers. See `hidden_states` under returned tensors for
more detail.
more detail.
return_dict (`bool`, *optional*):
return_dict (`bool`, *optional*):
Whether or not to return a [`~
file_
utils.ModelOutput`] instead of a plain tuple.
Whether or not to return a [`~utils.ModelOutput`] instead of a plain tuple.
"""
"""
CLIP_VISION_INPUTS_DOCSTRING
=
r
"""
CLIP_VISION_INPUTS_DOCSTRING
=
r
"""
...
@@ -115,7 +115,7 @@ CLIP_VISION_INPUTS_DOCSTRING = r"""
...
@@ -115,7 +115,7 @@ CLIP_VISION_INPUTS_DOCSTRING = r"""
Whether or not to return the hidden states of all layers. See `hidden_states` under returned tensors for
Whether or not to return the hidden states of all layers. See `hidden_states` under returned tensors for
more detail.
more detail.
return_dict (`bool`, *optional*):
return_dict (`bool`, *optional*):
Whether or not to return a [`~
file_
utils.ModelOutput`] instead of a plain tuple.
Whether or not to return a [`~utils.ModelOutput`] instead of a plain tuple.
"""
"""
CLIP_INPUTS_DOCSTRING
=
r
"""
CLIP_INPUTS_DOCSTRING
=
r
"""
...
@@ -150,7 +150,7 @@ CLIP_INPUTS_DOCSTRING = r"""
...
@@ -150,7 +150,7 @@ CLIP_INPUTS_DOCSTRING = r"""
Whether or not to return the hidden states of all layers. See `hidden_states` under returned tensors for
Whether or not to return the hidden states of all layers. See `hidden_states` under returned tensors for
more detail.
more detail.
return_dict (`bool`, *optional*):
return_dict (`bool`, *optional*):
Whether or not to return a [`~
file_
utils.ModelOutput`] instead of a plain tuple.
Whether or not to return a [`~utils.ModelOutput`] instead of a plain tuple.
"""
"""
...
...
src/transformers/models/clip/modeling_tf_clip.py
View file @
088c1880
...
@@ -968,8 +968,8 @@ CLIP_TEXT_INPUTS_DOCSTRING = r"""
...
@@ -968,8 +968,8 @@ CLIP_TEXT_INPUTS_DOCSTRING = r"""
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.
used instead.
return_dict (`bool`, *optional*):
return_dict (`bool`, *optional*):
Whether or not to return a [`~
file_
utils.ModelOutput`] instead of a plain tuple. This argument can be used
Whether or not to return a [`~utils.ModelOutput`] instead of a plain tuple. This argument can be used
in
in
eager mode, in graph mode the value will always be set to True.
eager mode, in graph mode the value will always be set to True.
training (`bool`, *optional*, defaults to `False``):
training (`bool`, *optional*, defaults to `False``):
Whether or not to use the model in training mode (some modules like dropout modules have different
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).
behaviors between training and evaluation).
...
@@ -988,8 +988,8 @@ CLIP_VISION_INPUTS_DOCSTRING = r"""
...
@@ -988,8 +988,8 @@ CLIP_VISION_INPUTS_DOCSTRING = r"""
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.
used instead.
return_dict (`bool`, *optional*):
return_dict (`bool`, *optional*):
Whether or not to return a [`~
file_
utils.ModelOutput`] instead of a plain tuple. This argument can be used
Whether or not to return a [`~utils.ModelOutput`] instead of a plain tuple. This argument can be used
in
in
eager mode, in graph mode the value will always be set to True.
eager mode, in graph mode the value will always be set to True.
training (`bool`, *optional*, defaults to `False``):
training (`bool`, *optional*, defaults to `False``):
Whether or not to use the model in training mode (some modules like dropout modules have different
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).
behaviors between training and evaluation).
...
@@ -1030,8 +1030,8 @@ CLIP_INPUTS_DOCSTRING = r"""
...
@@ -1030,8 +1030,8 @@ CLIP_INPUTS_DOCSTRING = r"""
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.
used instead.
return_dict (`bool`, *optional*):
return_dict (`bool`, *optional*):
Whether or not to return a [`~
file_
utils.ModelOutput`] instead of a plain tuple. This argument can be used
Whether or not to return a [`~utils.ModelOutput`] instead of a plain tuple. This argument can be used
in
in
eager mode, in graph mode the value will always be set to True.
eager mode, in graph mode the value will always be set to True.
training (`bool`, *optional*, defaults to `False``):
training (`bool`, *optional*, defaults to `False``):
Whether or not to use the model in training mode (some modules like dropout modules have different
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).
behaviors between training and evaluation).
...
...
src/transformers/models/clip/processing_clip.py
View file @
088c1880
...
@@ -57,7 +57,7 @@ class CLIPProcessor(ProcessorMixin):
...
@@ -57,7 +57,7 @@ class CLIPProcessor(ProcessorMixin):
tensor. In case of a NumPy array/PyTorch tensor, each image should be of shape (C, H, W), where C is a
tensor. In case of a NumPy array/PyTorch tensor, each image should be of shape (C, H, W), where C is a
number of channels, H and W are image height and width.
number of channels, H and W are image height and width.
return_tensors (`str` or [`~
file_
utils.TensorType`], *optional*):
return_tensors (`str` or [`~utils.TensorType`], *optional*):
If set, will return tensors of a particular framework. Acceptable values are:
If set, will return tensors of a particular framework. Acceptable values are:
- `'tf'`: Return TensorFlow `tf.constant` objects.
- `'tf'`: Return TensorFlow `tf.constant` objects.
...
...
src/transformers/models/convbert/modeling_convbert.py
View file @
088c1880
...
@@ -755,7 +755,7 @@ CONVBERT_INPUTS_DOCSTRING = r"""
...
@@ -755,7 +755,7 @@ CONVBERT_INPUTS_DOCSTRING = r"""
Whether or not to return the hidden states of all layers. See `hidden_states` under returned tensors for
Whether or not to return the hidden states of all layers. See `hidden_states` under returned tensors for
more detail.
more detail.
return_dict (`bool`, *optional*):
return_dict (`bool`, *optional*):
Whether or not to return a [`~
file_
utils.ModelOutput`] instead of a plain tuple.
Whether or not to return a [`~utils.ModelOutput`] instead of a plain tuple.
"""
"""
...
...
src/transformers/models/convbert/modeling_tf_convbert.py
View file @
088c1880
...
@@ -736,8 +736,8 @@ CONVBERT_INPUTS_DOCSTRING = r"""
...
@@ -736,8 +736,8 @@ CONVBERT_INPUTS_DOCSTRING = r"""
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.
used instead.
return_dict (`bool`, *optional*):
return_dict (`bool`, *optional*):
Whether or not to return a [`~
file_
utils.ModelOutput`] instead of a plain tuple. This argument can be used
Whether or not to return a [`~utils.ModelOutput`] instead of a plain tuple. This argument can be used
in
in
eager mode, in graph mode the value will always be set to True.
eager mode, in graph mode the value will always be set to True.
training (`bool`, *optional*, defaults to `False`):
training (`bool`, *optional*, defaults to `False`):
Whether or not to use the model in training mode (some modules like dropout modules have different
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).
behaviors between training and evaluation).
...
...
src/transformers/models/convnext/feature_extraction_convnext.py
View file @
088c1880
...
@@ -103,7 +103,7 @@ class ConvNextFeatureExtractor(FeatureExtractionMixin, ImageFeatureExtractionMix
...
@@ -103,7 +103,7 @@ class ConvNextFeatureExtractor(FeatureExtractionMixin, ImageFeatureExtractionMix
tensor. In case of a NumPy array/PyTorch tensor, each image should be of shape (C, H, W), where C is a
tensor. In case of a NumPy array/PyTorch tensor, each image should be of shape (C, H, W), where C is a
number of channels, H and W are image height and width.
number of channels, H and W are image height and width.
return_tensors (`str` or [`~
file_
utils.TensorType`], *optional*, defaults to `'np'`):
return_tensors (`str` or [`~utils.TensorType`], *optional*, defaults to `'np'`):
If set, will return tensors of a particular framework. Acceptable values are:
If set, will return tensors of a particular framework. Acceptable values are:
- `'tf'`: Return TensorFlow `tf.constant` objects.
- `'tf'`: Return TensorFlow `tf.constant` objects.
...
...
src/transformers/models/convnext/modeling_convnext.py
View file @
088c1880
...
@@ -357,7 +357,7 @@ CONVNEXT_INPUTS_DOCSTRING = r"""
...
@@ -357,7 +357,7 @@ CONVNEXT_INPUTS_DOCSTRING = r"""
Whether or not to return the hidden states of all layers. See `hidden_states` under returned tensors for
Whether or not to return the hidden states of all layers. See `hidden_states` under returned tensors for
more detail.
more detail.
return_dict (`bool`, *optional*):
return_dict (`bool`, *optional*):
Whether or not to return a [`~
file_
utils.ModelOutput`] instead of a plain tuple.
Whether or not to return a [`~utils.ModelOutput`] instead of a plain tuple.
"""
"""
...
...
src/transformers/models/convnext/modeling_tf_convnext.py
View file @
088c1880
...
@@ -416,8 +416,8 @@ CONVNEXT_INPUTS_DOCSTRING = r"""
...
@@ -416,8 +416,8 @@ CONVNEXT_INPUTS_DOCSTRING = r"""
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.
used instead.
return_dict (`bool`, *optional*):
return_dict (`bool`, *optional*):
Whether or not to return a [`~
file_
utils.ModelOutput`] instead of a plain tuple. This argument can be used
Whether or not to return a [`~utils.ModelOutput`] instead of a plain tuple. This argument can be used
in
in
eager mode, in graph mode the value will always be set to True.
eager mode, in graph mode the value will always be set to True.
"""
"""
...
...
src/transformers/models/ctrl/modeling_ctrl.py
View file @
088c1880
...
@@ -309,7 +309,7 @@ CTRL_INPUTS_DOCSTRING = r"""
...
@@ -309,7 +309,7 @@ CTRL_INPUTS_DOCSTRING = r"""
Whether or not to return the hidden states of all layers. See `hidden_states` under returned tensors for
Whether or not to return the hidden states of all layers. See `hidden_states` under returned tensors for
more detail.
more detail.
return_dict (`bool`, *optional*):
return_dict (`bool`, *optional*):
Whether or not to return a [`~
file_
utils.ModelOutput`] instead of a plain tuple.
Whether or not to return a [`~utils.ModelOutput`] instead of a plain tuple.
"""
"""
...
...
src/transformers/models/ctrl/modeling_tf_ctrl.py
View file @
088c1880
...
@@ -502,8 +502,8 @@ CTRL_INPUTS_DOCSTRING = r"""
...
@@ -502,8 +502,8 @@ CTRL_INPUTS_DOCSTRING = r"""
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.
used instead.
return_dict (`bool`, *optional*):
return_dict (`bool`, *optional*):
Whether or not to return a [`~
file_
utils.ModelOutput`] instead of a plain tuple. This argument can be used
Whether or not to return a [`~utils.ModelOutput`] instead of a plain tuple. This argument can be used
in
in
eager mode, in graph mode the value will always be set to True.
eager mode, in graph mode the value will always be set to True.
training (`bool`, *optional*, defaults to `False`):
training (`bool`, *optional*, defaults to `False`):
Whether or not to use the model in training mode (some modules like dropout modules have different
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).
behaviors between training and evaluation).
...
...
src/transformers/models/data2vec/modeling_data2vec_audio.py
View file @
088c1880
...
@@ -887,7 +887,7 @@ DATA2VEC_AUDIO_INPUTS_DOCSTRING = r"""
...
@@ -887,7 +887,7 @@ DATA2VEC_AUDIO_INPUTS_DOCSTRING = r"""
Whether or not to return the hidden states of all layers. See `hidden_states` under returned tensors for
Whether or not to return the hidden states of all layers. See `hidden_states` under returned tensors for
more detail.
more detail.
return_dict (`bool`, *optional*):
return_dict (`bool`, *optional*):
Whether or not to return a [`~
file_
utils.ModelOutput`] instead of a plain tuple.
Whether or not to return a [`~utils.ModelOutput`] instead of a plain tuple.
"""
"""
...
...
src/transformers/models/data2vec/modeling_data2vec_text.py
View file @
088c1880
...
@@ -689,7 +689,7 @@ DATA2VECTEXT_INPUTS_DOCSTRING = r"""
...
@@ -689,7 +689,7 @@ DATA2VECTEXT_INPUTS_DOCSTRING = r"""
Whether or not to return the hidden states of all layers. See `hidden_states` under returned tensors for
Whether or not to return the hidden states of all layers. See `hidden_states` under returned tensors for
more detail.
more detail.
return_dict (`bool`, *optional*):
return_dict (`bool`, *optional*):
Whether or not to return a [`~
file_
utils.ModelOutput`] instead of a plain tuple.
Whether or not to return a [`~utils.ModelOutput`] instead of a plain tuple.
"""
"""
...
...
Prev
1
2
3
4
5
6
7
…
12
Next
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