class_docstr: Randomly selects a rectangle region in an image and erases its pixels.
      'Random Erasing Data Augmentation' by Zhong et al.
      See https://arxiv.org/pdf/1708.04896.pdf
  
      This variant of RandomErasing is intended to be applied to either a batch
      or single image tensor after it has been normalized by dataset mean and std.
  Args:
       probability: Probability that the Random Erasing operation will be performed.
       min_area: Minimum percentage of erased area wrt input image area.
       max_area: Maximum percentage of erased area wrt input image area.
       min_aspect: Minimum aspect ratio of erased area.
       mode: pixel color mode, one of 'const', 'rand', or 'pixel'
          'const' - erase block is constant color of 0 for all channels
          'rand'  - erase block is same per-channel random (normal) color
          'pixel' - erase block is per-pixel random (normal) color
      max_count: maximum number of erasing blocks per image, area per box is scaled by count.
          per-image count is randomly chosen between 1 and this value.
code: def __init__(
      self,
      probability=0.5,
      min_area=0.02,
      max_area=1 / 3,
      min_aspect=0.3,
      max_aspect=None,
      mode="const",
      min_count=1,
      max_count=None,
      num_splits=0,
      device="cuda",
  ):
      self.probability = probability
      self.min_area = min_area
      self.max_area = max_area
      max_aspect = max_aspect or 1 / min_aspect
      self.log_aspect_ratio = (
          math.log(min_aspect),
          math.log(max_aspect),
      )
      self.min_count = min_count
      self.max_count = max_count or min_count
      self.num_splits = num_splits
      self.mode = mode.lower()
      self.rand_color = False
      self.per_pixel = False
      if self.mode == "rand":
          self.rand_color = True  # per block random normal
      elif self.mode == "pixel":
          self.per_pixel = True  # per pixel random normal
      else:
          assert not self.mode or self.mode == "const"
      self.device = device
  
file_path: pytorch-image-models/timm/data/random_erasing.py
imports: import random
  import math
  import torch
label_desc: Use image node_id 1 to create a new RandomErasing object  with example: obj = RandomErasing(probability, min_area, max_area, min_aspect, max_aspect, mode, min_count, max_count, num_splits, device)