class_docstr: Similarity geometric model to be used together with ImageRegistrator module for the optimization-based image
  registration.
  
  Args:
      rotation: if True, the rotation is optimizable, else constant zero.
      scale: if True, the scale is optimizable, else constant zero.
      shift: if True, the shift is optimizable, else constant one.
docstr: Single-batch similarity transform".
  
  Returns:
      Similarity with shape :math:`(1, 3, 3)`
docstr_tok: ["Single-batch","similarity","transform","''",".","Returns",":","Similarity","with","shape",":","math",":","`","(","1",",","3",",","3",")","`"]
code: def forward(self) -> Tensor:
      r"""Single-batch similarity transform".
  
      Returns:
          Similarity with shape :math:`(1, 3, 3)`
      """
      rot = self.scale * angle_to_rotation_matrix(self.rot)
      out = convert_affinematrix_to_homography(
          torch.cat([rot, self.shift], dim=2)
      )
      return out
  
imports: from abc import abstractmethod
  from typing import Any, Callable, Dict, List, Optional, Tuple, Type, Union
  import torch
  import torch.nn.functional
  from torch import nn, optim
  from kornia.core import Module, Tensor
  from kornia.geometry.conversions import angle_to_rotation_matrix, convert_affinematrix_to_homography
  from .homography_warper import BaseWarper, HomographyWarper
  from .pyramid import build_pyramid
label_desc: Use image node_id 4 for calling the Similarity obj's underlying member method code with example usage: obj.forward() and returns: out