class_docstr: Applies RandomErasing to a video.
  
  
  Reference: https://arxiv.org/abs/1708.04896
class_docstr_tok: ["Applies","RandomErasing","to","a","video",".","Reference",":","https",":","\/\/arxiv.org\/abs\/1708.04896"]
docstr: Applies RandomErasing to a video.
  
  Args:
    probability: Probability of augmenting the image. Defaults to `0.25`.
    min_area: Minimum area of the random erasing rectangle. Defaults to
      `0.02`.
    max_area: Maximum area of the random erasing rectangle. Defaults to `1/3`.
    min_aspect: Minimum aspect rate of the random erasing rectangle. Defaults
      to `0.3`.
    max_aspect: Maximum aspect rate of the random erasing rectangle. Defaults
      to `None`.
    min_count: Minimum number of erased rectangles. Defaults to `1`.
    max_count: Maximum number of erased rectangles. Defaults to `1`.
    trials: Maximum number of trials to randomly sample a rectangle that
      fulfills constraint. Defaults to `10`.
docstr_tok: ["Applies","RandomErasing","to","a","video",".","Args",":","probability",":","Probability","of","augmenting","the","image",".","Defaults","to","`","0.25","`",".","min_area",":","Minimum","area","of","the","random","erasing","rectangle",".","Defaults","to","`","0.02","`",".","max_area",":","Maximum","area","of","the","random","erasing","rectangle",".","Defaults","to","`","1\/3","`",".","min_aspect",":","Minimum","aspect","rate","of","the","random","erasing","rectangle",".","Defaults","to","`","0.3","`",".","max_aspect",":","Maximum","aspect","rate","of","the","random","erasing","rectangle",".","Defaults","to","`","None","`",".","min_count",":","Minimum","number","of","erased","rectangles",".","Defaults","to","`","1","`",".","max_count",":","Maximum","number","of","erased","rectangles",".","Defaults","to","`","1","`",".","trials",":","Maximum","number","of","trials","to","randomly","sample","a","rectangle","that","fulfills","constraint",".","Defaults","to","`","10","`","."]
code: def __init__(
      self,
      probability: float = 0.25,
      min_area: float = 0.02,
      max_area: float = 1 / 3,
      min_aspect: float = 0.3,
      max_aspect: Optional[float] = None,
      min_count=1,
      max_count=1,
      trials=10,
  ):
      """Applies RandomErasing to a video.
  
      Args:
        probability: Probability of augmenting the image. Defaults to `0.25`.
        min_area: Minimum area of the random erasing rectangle. Defaults to
          `0.02`.
        max_area: Maximum area of the random erasing rectangle. Defaults to `1/3`.
        min_aspect: Minimum aspect rate of the random erasing rectangle. Defaults
          to `0.3`.
        max_aspect: Maximum aspect rate of the random erasing rectangle. Defaults
          to `None`.
        min_count: Minimum number of erased rectangles. Defaults to `1`.
        max_count: Maximum number of erased rectangles. Defaults to `1`.
        trials: Maximum number of trials to randomly sample a rectangle that
          fulfills constraint. Defaults to `10`.
      """
      self._probability = probability
      self._min_area = float(min_area)
      self._max_area = float(max_area)
      self._min_log_aspect = math.log(min_aspect)
      self._max_log_aspect = math.log(max_aspect or 1 / min_aspect)
      self._min_count = min_count
      self._max_count = max_count
      self._trials = trials
  
imports: import functools
  import math
  from typing import Optional
  from absl import logging
  from dmvr import builders
  from dmvr import processors
  import simclr.tf2.data_util
  import tensorflow
  from official.vision.image_classification import augment
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, min_count, max_count, trials)