class_docstr: Draw activations of a specific layer for a given input
docstr: Compute activations at targeted layers.
  
  Args:
      validation_data (Tuple[np.ndarray, Optional[np.ndarray]]): Validation data
          to perform the method on. Tuple containing (x, y).
      model (tf.keras.Model): tf.keras model to inspect
      layers_name (List[str]): List of layer names to inspect
  
  Returns:
      np.ndarray: Grid of all the activations
code: def explain(self, validation_data, model, layers_name):
      """
      Compute activations at targeted layers.
  
      Args:
          validation_data (Tuple[np.ndarray, Optional[np.ndarray]]): Validation data
              to perform the method on. Tuple containing (x, y).
          model (tf.keras.Model): tf.keras model to inspect
          layers_name (List[str]): List of layer names to inspect
  
      Returns:
          np.ndarray: Grid of all the activations
      """
      activations_model = self.generate_activations_graph(
          model, layers_name
      )
  
      predictions = activations_model.predict(
          validation_data[0], batch_size=self.batch_size
      )
      grid = filter_display(predictions)
  
      grid = (grid - grid.min()) / (grid.max() - grid.min())
  
      return (np.clip(grid, 0, 1) * 255).astype("uint8")
  
file_path: tf-explain/tf_explain/core/activations.py
imports: import numpy
  import tensorflow
  from tf_explain.utils.display import filter_display
  from tf_explain.utils.saver import save_grayscale
label_desc: Use image node_id 2 for calling the ExtractActivations obj's underlying member method code with example usage: obj.explain(validation_data, model, layers_name) and returns: unknown