class_docstr: A single RandAugment layer.
class_docstr_tok: ["A","single","RandAugment","layer","."]
code: def call(self, inputs):
      x = inputs
      batch_size = ops.shape(x)[0]
      # selection tensor determines operation for each sample.
      selection = ops.cast(
          random.uniform(
              (batch_size, 1, 1, 1), maxval=len(self.layers)
          ),
          dtype="int32",
      )
  
      for i, layer in enumerate(self.layers):
          factor = self.factors[i]
          if factor == 0:
              continue
          transform_layer = TRANSFORMS[layer](factor)
          x_trans = transform_layer(x)
  
          # For each sample, apply the transform if and only if
          # selection matches the transform index `i`
          x = ops.where(ops.equal(i, selection), x_trans, x)
  
      return x
  
file_path: keras-tuner/keras_tuner/applications/augment.py
imports: from keras_tuner.api_export import keras_tuner_export
  from keras_tuner.backend import keras
  from keras_tuner.backend import ops
  from keras_tuner.backend import random
  from keras_tuner.backend.keras import layers
  from keras_tuner.engine import hypermodel
label_desc: Use image node_id 2 for calling the RandAugment obj's underlying member method code with example usage: obj.call(inputs) and returns: x