docstr: Embeds box prompts.
docstr_tok: ["Embeds","box","prompts","."]
code: def _embed_boxes(self, boxes: paddle.Tensor) -> paddle.Tensor:
      """Embeds box prompts."""
      boxes = boxes + 0.5
      """Class Method: *.reshape, not convert, please check whether it is torch.Tensor.*/Optimizer.*/nn.Module.*, and convert manually"""
      coords = boxes.reshape([-1, 2, 2])
      corner_embedding = self.pe_layer.forward_with_coords(
          coords, self.input_image_size
      )
      corner_embedding[:, (0), :] += self.point_embeddings[2].weight
      corner_embedding[:, (1), :] += self.point_embeddings[3].weight
      return corner_embedding
  
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 4 for calling the PromptEncoder obj's underlying member method code with example usage: obj._embed_boxes(boxes) and returns: corner_embedding