class_docstr: Rotary position embedding w/ concatenatd sin & cos
  
  The following impl/resources were referenced for this impl:
  * https://github.com/lucidrains/vit-pytorch/blob/6f3a5fcf0bca1c5ec33a35ef48d97213709df4ba/vit_pytorch/rvt.py
  * https://blog.eleuther.ai/rotary-embeddings/
code: def __init__(
      self,
      dim,
      max_res=224,
      temperature=10000,
      in_pixels=True,
      linear_bands: bool = False,
      feat_shape: Optional[List[int]] = None,
      ref_feat_shape: Optional[List[int]] = None,
  ):
      super().__init__()
      self.dim = dim
      self.max_res = max_res
      self.temperature = temperature
      self.in_pixels = in_pixels
      self.feat_shape = feat_shape
      self.ref_feat_shape = ref_feat_shape
  
      if feat_shape is None:
          # only cache bands
          if in_pixels:
              bands = pixel_freq_bands(
                  dim // 4,
                  float(max_res),
                  linear_bands=linear_bands,
              )
          else:
              bands = freq_bands(
                  dim // 4,
                  temperature=temperature,
                  step=1,
              )
          self.register_buffer(
              "bands",
              bands,
              persistent=False,
          )
          self.pos_embed = None
      else:
          # cache full sin/cos embeddings if shape provided up front
          embeds = build_rotary_pos_embed(
              feat_shape=feat_shape,
              dim=dim,
              max_res=max_res,
              linear_bands=linear_bands,
              in_pixels=in_pixels,
              ref_feat_shape=self.ref_feat_shape,
          )
          self.bands = None
          self.register_buffer(
              "pos_embed",
              torch.cat(embeds, -1),
              persistent=False,
          )
  
imports: import math
  from typing import List, Tuple, Optional, Union
  import torch
  from torch import nn
  from .trace_utils import _assert
label_desc: Use image node_id 1 to create a new RotaryEmbeddingCat object from inherited base classes: nn with example: obj = RotaryEmbeddingCat(dim, max_res, temperature, in_pixels, linear_bands, feat_shape, ref_feat_shape)