class_docstr: Pad the given sample to a specific size. Always occurs (p=1.0).
  
  .. image:: _static/img/PadTo.png
  
  Args:
      size: a tuple of ints in the format (height, width) that give the spatial
          dimensions to pad inputs to.
      pad_mode: the type of padding to perform on the image (valid values
          are those accepted by torch.nn.functional.pad)
      pad_value: fill value for 'constant' padding applied to the image
      keepdim: whether to keep the output shape the same as input (True) or broadcast it
               to the batch form (False).
  
  Shape:
      - Input: :math:`(C, H, W)` or :math:`(B, C, H, W)`, Optional: :math:`(B, 3, 3)`
      - Output: :math:`(B, C, H, W)`
  
  .. note::
      This function internally uses :func:`torch.nn.functional.pad`.
  
  Examples:
      >>> import torch
      >>> img = torch.tensor([[[[0., 0., 0.],
      ...                       [0., 0., 0.],
      ...                       [0., 0., 0.]]]])
      >>> pad = PadTo((4, 5), pad_value=1.)
      >>> out = pad(img)
      >>> out
      tensor([[[[0., 0., 0., 1., 1.],
                [0., 0., 0., 1., 1.],
                [0., 0., 0., 1., 1.],
                [1., 1., 1., 1., 1.]]]])
      >>> pad.inverse(out)
      tensor([[[[0., 0., 0.],
                [0., 0., 0.],
                [0., 0., 0.]]]])
code: def compute_transformation(
      self,
      image: Tensor,
      params: Dict[str, Tensor],
      flags: Dict[str, Any],
  ) -> Tensor:
      return self.identity_matrix(image)
  
file_path: kornia/kornia/augmentation/_2d/geometric/pad.py
imports: from typing import Any, Dict, Optional, Tuple
  import torch
  from torch import Tensor
  from kornia.augmentation._2d.geometric.base import GeometricAugmentationBase2D
label_desc: Use image node_id 2 for calling the PadTo obj's underlying member method code with example usage: obj.compute_transformation(image, params, flags) and returns: self