class_docstr: Captum Interpretation for Resnet
class_docstr_tok: ["Captum","Interpretation","for","Resnet"]
code: def _viz(self, attributions, dec_data, metric):
      default_cmap = LinearSegmentedColormap.from_list(
          self.cmap_name, self.colors, N=self.N
      )
      _ = viz.visualize_image_attr_multiple(
          np.transpose(
              attributions.squeeze().cpu().detach().numpy(), (1, 2, 0)
          ),
          np.transpose(dec_data[0].numpy(), (1, 2, 0)),
          methods=self.methods,
          cmap=default_cmap,
          show_colorbar=True,
          signs=self.signs,
          outlier_perc=self.outlier_perc,
          titles=[f"Original Image - ({dec_data[1]})", metric],
      )
  
file_path: fastai/fastai/callback/captum.py
imports: from __future__ import annotations
  import tempfile
  from ..basics import *
  from ipykernel import jsonutil
  from captum.attr import IntegratedGradients, NoiseTunnel, GradientShap, Occlusion
  from captum.attr import visualization
  from matplotlib.colors import LinearSegmentedColormap
  from captum.insights import AttributionVisualizer, Batch
  from captum.insights.attr_vis.features import ImageFeature
label_desc: Use image node_id 4 for calling the CaptumInterpretation obj's underlying member method code with example usage: obj._viz(attributions, dec_data, metric) without return types