class_docstr: GridMask class for grid masking augmentation.
class_docstr_tok: ["GridMask","class","for","grid","masking","augmentation","."]
docstr: Masks input image tensor with random grid mask.
docstr_tok: ["Masks","input","image","tensor","with","random","grid","mask","."]
code: def __call__(self, image, label):
      """Masks input image tensor with random grid mask."""
      h = tf.shape(image)[0]
      w = tf.shape(image)[1]
      grid = self.mask(h, w)
      grid = self.random_rotate(grid)
      mask = self.crop(grid, h, w)
      mask = tf.cast(mask, image.dtype)
      mask = tf.reshape(mask, (h, w))
      mask = (
          tf.expand_dims(mask, -1)
          if image._rank() != mask._rank()
          else mask
      )
      occur = tf.random.normal([], 0, 1) < self.prob
      image = tf.cond(occur, lambda: image * mask, lambda: image)
      return image, label
  
file_path: DALI/docs/examples/use_cases/tensorflow/efficientdet/pipeline/tf/gridmask.py
imports: import math
  import tensorflow
  from tensorflow_addons import image
label_desc: Use image node_id 5 for calling the GridMask obj's underlying member method code with example usage: obj.__call__(image, label) and returns: image,  label