code: def get_cam(imggrad, conv_out):
      """Compute CAM. Refer section 3 of https://arxiv.org/abs/1610.02391 for details"""
      weights = onp.mean(imggrad, axis=(1, 2))
      cam = onp.ones(conv_out.shape[1:], dtype=onp.float32)
      for i, w in enumerate(weights):
          cam += w * conv_out[i, :, :]
      cam = cv2.resize(cam, (imggrad.shape[1], imggrad.shape[2]))
      cam = onp.maximum(cam, 0)
      cam = (cam - onp.min(cam)) / (onp.max(cam) - onp.min(cam))
      cam = onp.uint8(cam * 255)
      return cam
  
imports: from __future__ import print_function
  import mxnet
  from mxnet import gluon, np, npx
  from mxnet import autograd
  from mxnet.gluon import nn
  import numpy
  import cv2
label_desc: Use image node_id 7 for calling a global function with example usage: get_cam(imggrad, conv_out) and returns: cam