class_docstr: AutoAugment data augmentation method based on
  `"AutoAugment: Learning Augmentation Strategies from Data" <https://arxiv.org/pdf/1805.09501.pdf>`_.
  If the image is torch Tensor, it should be of type torch.uint8, and it is expected
  to have [..., 1 or 3, H, W] shape, where ... means an arbitrary number of leading dimensions.
  If img is PIL Image, it is expected to be in mode "L" or "RGB".
  
  Args:
      policy (AutoAugmentPolicy): Desired policy enum defined by
          :class:`torchvision.transforms.autoaugment.AutoAugmentPolicy`. Default is ``AutoAugmentPolicy.IMAGENET``.
      interpolation (InterpolationMode): Desired interpolation enum defined by
          :class:`torchvision.transforms.InterpolationMode`. Default is ``InterpolationMode.NEAREST``.
          If input is Tensor, only ``InterpolationMode.NEAREST``, ``InterpolationMode.BILINEAR`` are supported.
      fill (sequence or number, optional): Pixel fill value for the area outside the transformed
          image. If given a number, the value is used for all bands respectively.
docstr:     img (PIL Image or Tensor): Image to be transformed.
  
  Returns:
      PIL Image or Tensor: AutoAugmented image.
docstr_tok: ["img","(","PIL","Image","or","Tensor",")",":","Image","to","be","transformed",".","Returns",":","PIL","Image","or","Tensor",":","AutoAugmented","image","."]
code: def forward(self, img: Tensor) -> Tensor:
      """
          img (PIL Image or Tensor): Image to be transformed.
  
      Returns:
          PIL Image or Tensor: AutoAugmented image.
      """
      fill = self.fill
      channels, height, width = F.get_dimensions(img)
      if isinstance(img, Tensor):
          if isinstance(fill, (int, float)):
              fill = [float(fill)] * channels
          elif fill is not None:
              fill = [float(f) for f in fill]
  
      transform_id, probs, signs = self.get_params(len(self.policies))
  
      op_meta = self._augmentation_space(10, (height, width))
      for i, (op_name, p, magnitude_id) in enumerate(
          self.policies[transform_id]
      ):
          if probs[i] <= p:
              magnitudes, signed = op_meta[op_name]
              magnitude = (
                  float(magnitudes[magnitude_id].item())
                  if magnitude_id is not None
                  else 0.0
              )
              if signed and signs[i] == 0:
                  magnitude *= -1.0
              img = _apply_op(
                  img,
                  op_name,
                  magnitude,
                  interpolation=self.interpolation,
                  fill=fill,
              )
  
      return img
  
imports: import math
  from enum import Enum
  from typing import Dict, List, Optional, Tuple
  import torch
  from torch import Tensor
  from .None import functional, InterpolationMode
label_desc: Use image node_id 5 for calling the AutoAugment obj's underlying member method code with example usage: obj.forward(img) and returns: img