class_docstr: Positional encoding using random spatial frequencies.
class_docstr_tok: ["Positional","encoding","using","random","spatial","frequencies","."]
docstr: Positionally encode points that are normalized to [0,1].
docstr_tok: ["Positionally","encode","points","that","are","normalized","to","[","0,1","]","."]
code: def _pe_encoding(self, coords: paddle.Tensor) -> paddle.Tensor:
      """Positionally encode points that are normalized to [0,1]."""
      coords = 2 * coords - 1
      coords = coords @ self.positional_encoding_gaussian_matrix
      coords = 2 * np.pi * coords
      return paddle.concat(
          x=[paddle.sin(x=coords), paddle.cos(x=coords)], axis=-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 2 for calling the PositionEmbeddingRandom obj's underlying member method code with example usage: obj._pe_encoding(coords) and returns: paddle