code: def __init__(self, model, target_layer_name_keys=None, use_inp=False):
      super(GradCAMExplainer, self).__init__(model)
      self.target_layer = _get_layer(model, target_layer_name_keys)
      self.use_inp = use_inp
      self.intermediate_act = []
      self.intermediate_grad = []
      self.handle_forward_hook = None
      self.handle_backward_hook = None
      self._register_forward_backward_hook()
  
file_path: tensorwatch/tensorwatch/saliency/gradcam.py
imports: import torch
  from .backprop import VanillaGradExplainer
label_desc: Use image node_id 1 to create a new GradCAMExplainer object from inherited base classes: VanillaGradExplainer with example: obj = GradCAMExplainer(model, target_layer_name_keys, use_inp)