docstr: Gets the batch size of the output given the batch size of the input prompts.
docstr_tok: ["Gets","the","batch","size","of","the","output","given","the","batch","size","of","the","input","prompts","."]
code: def _get_batch_size(
      self,
      points: Optional[Tuple[paddle.Tensor, paddle.Tensor]],
      boxes: Optional[paddle.Tensor],
      masks: Optional[paddle.Tensor],
  ) -> int:
      """
      Gets the batch size of the output given the batch size of the input prompts.
      """
      if points is not None:
          return points[0].shape[0]
      elif boxes is not None:
          return boxes.shape[0]
      elif masks is not None:
          return masks.shape[0]
      else:
          return 1
  
file_path: PaddleSeg/contrib/SegmentAnything/segment_anything/modeling/prompt_encoder.py
imports: import paddle
  import numpy
  from typing import Any, Optional, Tuple, Type
  from common import LayerNorm2d
label_desc: Use image node_id 6 for calling the PromptEncoder obj's underlying member method code with example usage: obj._get_batch_size(points, boxes, masks) and returns: points, boxes, masks, int