class_docstr: Rescale the input torch.Tensor with the given factor.
  
  Args:
      factor: Desired scaling factor in each direction. If scalar, the value is used
          for both the x- and y-direction.
      interpolation:  algorithm used for upsampling: ``'nearest'`` | ``'linear'`` | ``'bilinear'`` |
          ``'bicubic'`` | ``'trilinear'`` | ``'area'``.
      align_corners: interpolation flag.
      side: Corresponding side if ``size`` is an integer. Can be one of ``'short'``, ``'long'``, ``'vert'``,
          or ``'horz'``.
      antialias: if True, then image will be filtered with Gaussian before downscaling.
          No effect for upscaling.
  
  Returns:
      The rescaled tensor with the shape according to the given factor.
  
  Example:
      >>> img = torch.rand(1, 3, 4, 4)
      >>> out = Rescale((2, 3))(img)
      >>> print(out.shape)
      torch.Size([1, 3, 8, 12])
class_docstr_tok: ["Rescale","the","input","torch.Tensor","with","the","given","factor",".","Args",":","factor",":","Desired","scaling","factor","in","each","direction",".","If","scalar",",","the","value","is","used","for","both","the","x-","and","y-direction",".","interpolation",":","algorithm","used","for","upsampling",":","``","'nearest","'","``","|","``","'linear","'","``","|","``","'bilinear","'","``","|","``","'bicubic","'","``","|","``","'trilinear","'","``","|","``","'area","'","``",".","align_corners",":","interpolation","flag",".","side",":","Corresponding","side","if","``","size","``","is","an","integer",".","Can","be","one","of","``","'short","'","``",",","``","'long","'","``",",","``","'vert","'","``",",","or","``","'horz","'","``",".","antialias",":","if","True",",","then","image","will","be","filtered","with","Gaussian","before","downscaling",".","No","effect","for","upscaling",".","Returns",":","The","rescaled","tensor","with","the","shape","according","to","the","given","factor",".","Example",":",">",">",">","img","=","torch.rand","(","1",",","3",",","4",",","4",")",">",">",">","out","=","Rescale","(","(","2",",","3",")",")","(","img",")",">",">",">","print","(","out.shape",")","torch.Size","(","[","1",",","3",",","8",",","12","]",")"]
code: def __init__(
      self,
      factor: Union[float, Tuple[float, float]],
      interpolation: str = "bilinear",
      align_corners: bool = True,
      antialias: bool = False,
  ) -> None:
      super().__init__()
      self.factor: Union[float, Tuple[float, float]] = factor
      self.interpolation: str = interpolation
      self.align_corners: Optional[bool] = align_corners
      self.antialias: bool = antialias
  
imports: from typing import Optional, Tuple, Union
  import torch
  from torch import nn
  from kornia.core import ones, ones_like, zeros
  from kornia.filters import gaussian_blur2d
  from kornia.utils import _extract_device_dtype
  from kornia.utils.image import perform_keep_shape_image
  from kornia.utils.misc import eye_like
  from .imgwarp import get_affine_matrix2d, get_projective_transform, get_rotation_matrix2d, warp_affine, warp_affine3d
label_desc: Use image node_id 1 to create a new Rescale object from inherited base classes: nn with example: obj = Rescale(factor, interpolation, align_corners, antialias)