class_docstr: Base class for CAM methods.
docstr: Computes the actual feature map size given `nn_module` and the target_layer name.
  Args:
      input_size: shape of the input tensor
      device: the device used to initialise the input tensor
      layer_idx: index of the target layer if there are multiple target layers. Defaults to -1.
      kwargs: any extra arguments to be passed on to the module as part of its `__call__`.
  Returns:
      shape of the actual feature map.
code: def feature_map_size(
      self, input_size, device="cpu", layer_idx=-1, **kwargs
  ):
      """
      Computes the actual feature map size given `nn_module` and the target_layer name.
      Args:
          input_size: shape of the input tensor
          device: the device used to initialise the input tensor
          layer_idx: index of the target layer if there are multiple target layers. Defaults to -1.
          kwargs: any extra arguments to be passed on to the module as part of its `__call__`.
      Returns:
          shape of the actual feature map.
      """
      return self.compute_map(
          torch.zeros(*input_size, device=device),
          layer_idx=layer_idx,
          **kwargs,
      ).shape
  
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 2 for calling the CAMBase obj's underlying member method code with example usage: obj.feature_map_size(input_size, device, layer_idx) and returns: self