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
261301d3
"vscode:/vscode.git/clone" did not exist on "df56c843be370bd73d9ce4e597d4c7f55e4e41d9"
Unverified
Commit
261301d3
authored
Sep 20, 2022
by
S.Kishore
Committed by
GitHub
Sep 20, 2022
Browse files
Added type hints for YolosForObjectDetection (#19086)
parent
801ebd04
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
src/transformers/models/yolos/modeling_yolos.py
src/transformers/models/yolos/modeling_yolos.py
+6
-6
No files found.
src/transformers/models/yolos/modeling_yolos.py
View file @
261301d3
...
...
@@ -737,12 +737,12 @@ class YolosForObjectDetection(YolosPreTrainedModel):
@
replace_return_docstrings
(
output_type
=
YolosObjectDetectionOutput
,
config_class
=
_CONFIG_FOR_DOC
)
def
forward
(
self
,
pixel_values
,
labels
=
None
,
output_attentions
=
None
,
output_hidden_states
=
None
,
return_dict
=
None
,
):
pixel_values
:
torch
.
FloatTensor
,
labels
:
Optional
[
List
[
Dict
]]
=
None
,
output_attentions
:
Optional
[
bool
]
=
None
,
output_hidden_states
:
Optional
[
bool
]
=
None
,
return_dict
:
Optional
[
bool
]
=
None
,
)
->
Union
[
Tuple
,
YolosObjectDetectionOutput
]
:
r
"""
labels (`List[Dict]` of len `(batch_size,)`, *optional*):
Labels for computing the bipartite matching loss. List of dicts, each dictionary containing at least the
...
...
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