class_docstr: Perform Occlusion Sensitivity for a given input
docstr: Constructor.
  
  Args:
      validation_data (Tuple[np.ndarray, Optional[np.ndarray]]): Validation data
          to perform the method on. Tuple containing (x, y).
      class_index (int): Index of targeted class
      patch_size (int): Size of patch to apply on the image
      output_dir (str): Output directory path
code: def __init__(
      self,
      validation_data,
      class_index,
      patch_size,
      output_dir=Path("./logs/occlusion_sensitivity"),
  ):
      """
      Constructor.
  
      Args:
          validation_data (Tuple[np.ndarray, Optional[np.ndarray]]): Validation data
              to perform the method on. Tuple containing (x, y).
          class_index (int): Index of targeted class
          patch_size (int): Size of patch to apply on the image
          output_dir (str): Output directory path
      """
      super().__init__()
      self.validation_data = validation_data
      self.class_index = class_index
      self.patch_size = patch_size
      self.output_dir = Path(output_dir) / datetime.now().strftime(
          "%Y%m%d-%H%M%S.%f"
      )
      Path.mkdir(self.output_dir, parents=True, exist_ok=True)
  
      self.file_writer = tf.summary.create_file_writer(
          str(self.output_dir)
      )
  
file_path: tf-explain/tf_explain/callbacks/occlusion_sensitivity.py
imports: from datetime import datetime
  from pathlib import Path
  import numpy
  import tensorflow
  from tensorflow.keras.callbacks import Callback
  from tf_explain.core.occlusion_sensitivity import OcclusionSensitivity
label_desc: Use image node_id 1 to create a new OcclusionSensitivityCallback object from inherited base classes: Callback with example: obj = OcclusionSensitivityCallback(validation_data, class_index, patch_size, output_dir)