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
daf4436e
"templates/vscode:/vscode.git/clone" did not exist on "282ae123e21329471f00500cea463bb775692ef0"
Unverified
Commit
daf4436e
authored
Nov 10, 2022
by
Matthijs Hollemans
Committed by
GitHub
Nov 10, 2022
Browse files
doc comment fix: Args was in wrong place (#20164)
parent
9f0c72f9
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
src/transformers/models/dpt/image_processing_dpt.py
src/transformers/models/dpt/image_processing_dpt.py
+3
-1
src/transformers/models/mobilevit/image_processing_mobilevit.py
...ansformers/models/mobilevit/image_processing_mobilevit.py
+3
-1
No files found.
src/transformers/models/dpt/image_processing_dpt.py
View file @
daf4436e
...
...
@@ -345,13 +345,15 @@ class DPTImageProcessor(BaseImageProcessor):
def
post_process_semantic_segmentation
(
self
,
outputs
,
target_sizes
:
List
[
Tuple
]
=
None
):
"""
Args:
Converts the output of [`DPTForSemanticSegmentation`] into semantic segmentation maps. Only supports PyTorch.
Args:
outputs ([`DPTForSemanticSegmentation`]):
Raw outputs of the model.
target_sizes (`List[Tuple]` of length `batch_size`, *optional*):
List of tuples corresponding to the requested final size (height, width) of each prediction. If unset,
predictions will not be resized.
Returns:
semantic_segmentation: `List[torch.Tensor]` of length `batch_size`, where each item is a semantic
segmentation map of shape (height, width) corresponding to the target_sizes entry (if `target_sizes` is
...
...
src/transformers/models/mobilevit/image_processing_mobilevit.py
View file @
daf4436e
...
...
@@ -323,14 +323,16 @@ class MobileViTImageProcessor(BaseImageProcessor):
def
post_process_semantic_segmentation
(
self
,
outputs
,
target_sizes
:
List
[
Tuple
]
=
None
):
"""
Args:
Converts the output of [`MobileViTForSemanticSegmentation`] into semantic segmentation maps. Only supports
PyTorch.
Args:
outputs ([`MobileViTForSemanticSegmentation`]):
Raw outputs of the model.
target_sizes (`List[Tuple]`, *optional*):
A list of length `batch_size`, where each item is a `Tuple[int, int]` corresponding to the requested
final size (height, width) of each prediction. If left to None, predictions will not be resized.
Returns:
`List[torch.Tensor]`:
A list of length `batch_size`, where each item is a semantic segmentation map of shape (height, width)
...
...
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