class_docstr: This is a sinusoidal position encoding that generalized to 2-dimensional images.
docstr: Updates position encoding to new max_shape.
  
  For 1/8 feature map (which is standard): If the input image size is H, W (both divisible by 8), the max_shape
  should be (H//8, W//8).
docstr_tok: ["Updates","position","encoding","to","new","max_shape",".","For","1\/8","feature","map","(","which","is","standard",")",":","If","the","input","image","size","is","H",",","W","(","both","divisible","by","8",")",",","the","max_shape","should","be","(","H\/\/8",",","W\/\/8",")","."]
code: def update_position_encoding_size(
      self, max_shape: Tuple[int, int]
  ) -> None:
      """Updates position encoding to new max_shape.
  
      For 1/8 feature map (which is standard): If the input image size is H, W (both divisible by 8), the max_shape
      should be (H//8, W//8).
      """
      self.pe = self._create_position_encoding(max_shape).to(
          self.pe.device
      )
  
file_path: kornia/kornia/feature/loftr/utils/position_encoding.py
imports: import math
  from typing import Tuple
  import torch
  from kornia.core import Module, Tensor, cos, sin, zeros
label_desc: Use image node_id 3 for calling the PositionEncodingSine obj's underlying member method code with example usage: obj.update_position_encoding_size(max_shape) without return types