class_docstr: Randomly select a rectangle region in the input image or video and erase its pixels.
  
  This transform does not support PIL Image.
  'Random Erasing Data Augmentation' by Zhong et al. See https://arxiv.org/abs/1708.04896
  
  Args:
      p (float, optional): probability that the random erasing operation will be performed.
      scale (tuple of float, optional): range of proportion of erased area against input image.
      ratio (tuple of float, optional): range of aspect ratio of erased area.
      value (number or tuple of numbers): erasing value. Default is 0. If a single int, it is used to
          erase all pixels. If a tuple of length 3, it is used to erase
          R, G, B channels respectively.
          If a str of 'random', erasing each pixel with random values.
      inplace (bool, optional): boolean to make this transform inplace. Default set to False.
  
  Returns:
      Erased input.
  
  Example:
      >>> from torchvision.transforms import v2 as transforms
      >>>
      >>> transform = transforms.Compose([
      >>>   transforms.RandomHorizontalFlip(),
      >>>   transforms.PILToTensor(),
      >>>   transforms.ConvertImageDtype(torch.float),
      >>>   transforms.Normalize((0.485, 0.456, 0.406), (0.229, 0.224, 0.225)),
      >>>   transforms.RandomErasing(),
      >>> ])
class_docstr_tok: ["Randomly","select","a","rectangle","region","in","the","input","image","or","video","and","erase","its","pixels",".","This","transform","does","not","support","PIL","Image",".","'Random","Erasing","Data","Augmentation","'","by","Zhong","et","al",".","See","https",":","\/\/arxiv.org\/abs\/1708.04896","Args",":","p","(","float",",","optional",")",":","probability","that","the","random","erasing","operation","will","be","performed",".","scale","(","tuple","of","float",",","optional",")",":","range","of","proportion","of","erased","area","against","input","image",".","ratio","(","tuple","of","float",",","optional",")",":","range","of","aspect","ratio","of","erased","area",".","value","(","number","or","tuple","of","numbers",")",":","erasing","value",".","Default","is","0",".","If","a","single","int",",","it","is","used","to","erase","all","pixels",".","If","a","tuple","of","length","3",",","it","is","used","to","erase","R",",","G",",","B","channels","respectively",".","If","a","str","of","'random","'",",","erasing","each","pixel","with","random","values",".","inplace","(","bool",",","optional",")",":","boolean","to","make","this","transform","inplace",".","Default","set","to","False",".","Returns",":","Erased","input",".","Example",":",">",">",">","from","torchvision.transforms","import","v2","as","transforms",">",">",">",">",">",">","transform","=","transforms.Compose","(","[",">",">",">","transforms.RandomHorizontalFlip","(",")",",",">",">",">","transforms.PILToTensor","(",")",",",">",">",">","transforms.ConvertImageDtype","(","torch.float",")",",",">",">",">","transforms.Normalize","(","(","0.485",",","0.456",",","0.406",")",",","(","0.229",",","0.224",",","0.225",")",")",",",">",">",">","transforms.RandomErasing","(",")",",",">",">",">","]",")"]
code: def _transform(self, inpt: Any, params: Dict[str, Any]) -> Any:
      if params["v"] is not None:
          inpt = self._call_kernel(
              F.erase, inpt, **params, inplace=self.inplace
          )
  
      return inpt
  
imports: import math
  import numbers
  import warnings
  from typing import Any, Callable, Dict, List, Tuple
  import PIL.Image
  import torch
  from torch.nn.functional import one_hot
  from torch.utils._pytree import tree_flatten, tree_unflatten
  from torchvision import transforms, tv_tensors
  from torchvision.transforms.v2 import functional
  from ._transform import _RandomApplyTransform, Transform
  from ._utils import _parse_labels_getter, has_any, is_pure_tensor, query_chw, query_size
label_desc: Use image node_id 5 for calling the RandomErasing obj's underlying member method code with example usage: obj._transform(inpt, params) and returns: inpt