Unverified Commit daf4436e authored by Matthijs Hollemans's avatar Matthijs Hollemans Committed by GitHub
Browse files

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

parent 9f0c72f9
...@@ -345,13 +345,15 @@ class DPTImageProcessor(BaseImageProcessor): ...@@ -345,13 +345,15 @@ class DPTImageProcessor(BaseImageProcessor):
def post_process_semantic_segmentation(self, outputs, target_sizes: List[Tuple] = None): 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. Converts the output of [`DPTForSemanticSegmentation`] into semantic segmentation maps. Only supports PyTorch.
Args:
outputs ([`DPTForSemanticSegmentation`]): outputs ([`DPTForSemanticSegmentation`]):
Raw outputs of the model. Raw outputs of the model.
target_sizes (`List[Tuple]` of length `batch_size`, *optional*): 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, List of tuples corresponding to the requested final size (height, width) of each prediction. If unset,
predictions will not be resized. predictions will not be resized.
Returns: Returns:
semantic_segmentation: `List[torch.Tensor]` of length `batch_size`, where each item is a semantic 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 segmentation map of shape (height, width) corresponding to the target_sizes entry (if `target_sizes` is
......
...@@ -323,14 +323,16 @@ class MobileViTImageProcessor(BaseImageProcessor): ...@@ -323,14 +323,16 @@ class MobileViTImageProcessor(BaseImageProcessor):
def post_process_semantic_segmentation(self, outputs, target_sizes: List[Tuple] = None): def post_process_semantic_segmentation(self, outputs, target_sizes: List[Tuple] = None):
""" """
Args:
Converts the output of [`MobileViTForSemanticSegmentation`] into semantic segmentation maps. Only supports Converts the output of [`MobileViTForSemanticSegmentation`] into semantic segmentation maps. Only supports
PyTorch. PyTorch.
Args:
outputs ([`MobileViTForSemanticSegmentation`]): outputs ([`MobileViTForSemanticSegmentation`]):
Raw outputs of the model. Raw outputs of the model.
target_sizes (`List[Tuple]`, *optional*): target_sizes (`List[Tuple]`, *optional*):
A list of length `batch_size`, where each item is a `Tuple[int, int]` corresponding to the requested 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. final size (height, width) of each prediction. If left to None, predictions will not be resized.
Returns: Returns:
`List[torch.Tensor]`: `List[torch.Tensor]`:
A list of length `batch_size`, where each item is a semantic segmentation map of shape (height, width) A list of length `batch_size`, where each item is a semantic segmentation map of shape (height, width)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment