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
1bbad7a2
Unverified
Commit
1bbad7a2
authored
Sep 19, 2022
by
S.Kishore
Committed by
GitHub
Sep 19, 2022
Browse files
Added Type hints for VIT MAE (#19085)
* Added Type hints for VIT MAE * Ran make fixup
parent
fbe8464b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
14 deletions
+14
-14
src/transformers/models/vit_mae/modeling_vit_mae.py
src/transformers/models/vit_mae/modeling_vit_mae.py
+14
-14
No files found.
src/transformers/models/vit_mae/modeling_vit_mae.py
View file @
1bbad7a2
...
...
@@ -665,13 +665,13 @@ class ViTMAEModel(ViTMAEPreTrainedModel):
@
replace_return_docstrings
(
output_type
=
ViTMAEModelOutput
,
config_class
=
_CONFIG_FOR_DOC
)
def
forward
(
self
,
pixel_values
=
None
,
noise
=
None
,
head_mask
=
None
,
output_attentions
=
None
,
output_hidden_states
=
None
,
return_dict
=
None
,
):
pixel_values
:
Optional
[
torch
.
FloatTensor
]
=
None
,
noise
:
Optional
[
torch
.
FloatTensor
]
=
None
,
head_mask
:
Optional
[
torch
.
FloatTensor
]
=
None
,
output_attentions
:
Optional
[
bool
]
=
None
,
output_hidden_states
:
Optional
[
bool
]
=
None
,
return_dict
:
Optional
[
bool
]
=
None
,
)
->
Union
[
Tuple
,
ViTMAEModelOutput
]
:
r
"""
Returns:
...
...
@@ -957,13 +957,13 @@ class ViTMAEForPreTraining(ViTMAEPreTrainedModel):
@
replace_return_docstrings
(
output_type
=
ViTMAEForPreTrainingOutput
,
config_class
=
_CONFIG_FOR_DOC
)
def
forward
(
self
,
pixel_values
=
None
,
noise
=
None
,
head_mask
=
None
,
output_attentions
=
None
,
output_hidden_states
=
None
,
return_dict
=
None
,
):
pixel_values
:
Optional
[
torch
.
FloatTensor
]
=
None
,
noise
:
Optional
[
torch
.
FloatTensor
]
=
None
,
head_mask
:
Optional
[
torch
.
FloatTensor
]
=
None
,
output_attentions
:
Optional
[
bool
]
=
None
,
output_hidden_states
:
Optional
[
bool
]
=
None
,
return_dict
:
Optional
[
bool
]
=
None
,
)
->
Union
[
Tuple
,
ViTMAEForPreTrainingOutput
]
:
r
"""
Returns:
...
...
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