doc comment fix: Args was in wrong place (#20164)

This commit is contained in:
Matthijs Hollemans 2022-11-10 16:02:24 +01:00 committed by GitHub
parent 9f0c72f93b
commit daf4436e07
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -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

View File

@ -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)