class_docstr: Perform Gradients*Inputs algorithm (gradients ponderated by the input values).
class_docstr_tok: ["Perform","Gradients","*","Inputs","algorithm","(","gradients","ponderated","by","the","input","values",")","."]
docstr: Compute gradients ponderated by input values for target class.
  
  Args:
      images (numpy.ndarray): 4D-Tensor of images with shape (batch_size, H, W, 3)
      model (tf.keras.Model): tf.keras model to inspect
      class_index (int): Index of targeted class
  
  Returns:
      tf.Tensor: 4D-Tensor
docstr_tok: ["Compute","gradients","ponderated","by","input","values","for","target","class",".","Args",":","images","(","numpy.ndarray",")",":","4D-Tensor","of","images","with","shape","(","batch_size",",","H",",","W",",","3",")","model","(","tf.keras.Model",")",":","tf.keras","model","to","inspect","class_index","(","int",")",":","Index","of","targeted","class","Returns",":","tf.Tensor",":","4D-Tensor"]
code: def compute_gradients(images, model, class_index):
      """
      Compute gradients ponderated by input values for target class.
  
      Args:
          images (numpy.ndarray): 4D-Tensor of images with shape (batch_size, H, W, 3)
          model (tf.keras.Model): tf.keras model to inspect
          class_index (int): Index of targeted class
  
      Returns:
          tf.Tensor: 4D-Tensor
      """
      gradients = VanillaGradients.compute_gradients(
          images, model, class_index
      )
      inputs = tf.cast(images, tf.float32)
  
      return tf.multiply(inputs, gradients)
  
imports: import tensorflow
  from tf_explain.core.vanilla_gradients import VanillaGradients
label_desc: Use image node_id 1 for calling the GradientsInputs obj's underlying member method code with example usage: obj.compute_gradients(images, model, class_index) and returns: tf