class_docstr: Computes Gradient-weighted Class Activation Mapping (Grad-CAM++).
  This implementation is based on:
  
      Chattopadhyay et al., Grad-CAM++: Improved Visual Explanations for Deep Convolutional Networks,
      https://arxiv.org/abs/1710.11063
  
  See Also:
  
      - :py:class:`monai.visualize.class_activation_maps.GradCAM`
code: def compute_map(
      self,
      x,
      class_idx=None,
      retain_graph=False,
      layer_idx=-1,
      **kwargs,
  ):
      _, acti, grad = self.nn_module(
          x, class_idx=class_idx, retain_graph=retain_graph, **kwargs
      )
      acti, grad = acti[layer_idx], grad[layer_idx]
      b, c, *spatial = grad.shape
      alpha_nr = grad.pow(2)
      alpha_dr = alpha_nr.mul(2) + acti.mul(grad.pow(3)).view(
          b, c, -1
      ).sum(-1).view(b, c, *[1] * len(spatial))
      alpha_dr = torch.where(
          alpha_dr != 0.0, alpha_dr, torch.ones_like(alpha_dr)
      )
      alpha = alpha_nr.div(alpha_dr + 1e-7)
      relu_grad = F.relu(
          cast(torch.Tensor, self.nn_module.score).exp() * grad
      )
      weights = (
          (alpha * relu_grad)
          .view(b, c, -1)
          .sum(-1)
          .view(b, c, *[1] * len(spatial))
      )
      acti_map = (weights * acti).sum(1, keepdim=True)
      return F.relu(acti_map)
  
imports: from __future__ import annotations
  import warnings
  from collections.abc import Callable, Sequence
  from typing import cast
  import numpy
  import torch
  import torch.nn
  import torch.nn.functional
  from monai.config import NdarrayTensor
  from monai.transforms import ScaleIntensity
  from monai.utils import ensure_tuple, pytorch_after
  from monai.visualize.visualizer import default_upsampler
label_desc: Use image node_id 1 for calling the GradCAMpp obj's underlying member method code with example usage: obj.compute_map(x, class_idx, retain_graph, layer_idx) and returns: F