code: def compute_cam_per_layer(self, input_tensor):
      activations_list = [
          a.cpu().data.numpy()
          for a in self.activations_and_grads.activations
      ]
      grads_list = [
          g.cpu().data.numpy()
          for g in self.activations_and_grads.gradients
      ]
      target_size = self.get_target_width_height(input_tensor)
  
      cam_per_target_layer = []
      # Loop over the saliency image from every layer
  
      for layer_activations, layer_grads in zip(
          activations_list, grads_list
      ):
          cam = self.get_cam_image(layer_activations, layer_grads)
          cam[
              cam < 0
          ] = 0  # works like mute the min-max scale in the function of scale_cam_image
          scaled = self.scale_cam_image(cam, target_size)
          cam_per_target_layer.append(scaled[:, None, :])
  
      return cam_per_target_layer
  
imports: import cv2
  import numpy
label_desc: Use image node_id 6 for calling the GradCAM obj's underlying member method code with example usage: obj.compute_cam_per_layer(input_tensor) and returns: cam_per_target_layer