class_docstr: Resize to size.
  
  Args:
      size: Size (h, w) in pixels of the resized region or just one side.
      side: Which side to resize, if size is only of type int.
      resample: Resampling mode.
      align_corners: interpolation flag.
      antialias: if True, then image will be filtered with Gaussian before downscaling. No effect for upscaling.
      keepdim: whether to keep the output shape the same as input (True) or broadcast it
          to the batch form (False).
class_docstr_tok: ["Resize","to","size",".","Args",":","size",":","Size","(","h",",","w",")","in","pixels","of","the","resized","region","or","just","one","side",".","side",":","Which","side","to","resize",",","if","size","is","only","of","type","int",".","resample",":","Resampling","mode",".","align_corners",":","interpolation","flag",".","antialias",":","if","True",",","then","image","will","be","filtered","with","Gaussian","before","downscaling",".","No","effect","for","upscaling",".","keepdim",":","whether","to","keep","the","output","shape","the","same","as","input","(","True",")","or","broadcast","it","to","the","batch","form","(","False",")","."]
code: def apply_transform(
      self,
      input: Tensor,
      params: Dict[str, Tensor],
      flags: Dict[str, Any],
      transform: Optional[Tensor] = None,
  ) -> Tensor:
      B, C, _, _ = input.shape
      out_size = tuple(params["output_size"][0].tolist())
      out = torch.empty(
          B, C, *out_size, device=input.device, dtype=input.dtype
      )
  
      for i in range(B):
          x1 = int(params["src"][i, 0, 0])
          x2 = int(params["src"][i, 1, 0]) + 1
          y1 = int(params["src"][i, 0, 1])
          y2 = int(params["src"][i, 3, 1]) + 1
          out[i] = resize(
              input[i : i + 1, :, y1:y2, x1:x2],
              out_size,
              interpolation=flags["resample"].name.lower(),
              align_corners=(
                  flags["align_corners"]
                  if flags["resample"]
                  in [Resample.BILINEAR, Resample.BICUBIC]
                  else None
              ),
              antialias=flags["antialias"],
          )
      return out
  
file_path: kornia/kornia/augmentation/_2d/geometric/resize.py
imports: from typing import Any, Dict, Optional, Tuple, Union
  import torch
  from kornia.augmentation import random_generator
  from kornia.augmentation._2d.geometric.base import GeometricAugmentationBase2D
  from kornia.constants import Resample
  from kornia.core import Tensor
  from kornia.geometry.transform import crop_by_transform_mat, get_perspective_transform, resize
  from kornia.utils import eye_like
label_desc: Use image node_id 3 for calling the Resize obj's underlying member method code with example usage: obj.apply_transform(input, params, flags, transform) and returns: out