class_docstr: Base default handler to load torchscript or eager mode [state_dict] models
  Also, provides handle method per torch serve custom model specification
class_docstr_tok: ["Base","default","handler","to","load","torchscript","or","eager","mode","[","state_dict","]","models","Also",",","provides","handle","method","per","torch","serve","custom","model","specification"]
docstr: Captum explanations handler
  
  Args:
      data_preprocess (Torch Tensor): Preprocessed data to be used for captum
      raw_data (list): The unprocessed data to get target from the request
  
  Returns:
      dict : A dictionary response with the explanations response.
docstr_tok: ["Captum","explanations","handler","Args",":","data_preprocess","(","Torch","Tensor",")",":","Preprocessed","data","to","be","used","for","captum","raw_data","(","list",")",":","The","unprocessed","data","to","get","target","from","the","request","Returns",":","dict",":","A","dictionary","response","with","the","explanations","response","."]
code: def explain_handle(self, data_preprocess, raw_data):
      """Captum explanations handler
  
      Args:
          data_preprocess (Torch Tensor): Preprocessed data to be used for captum
          raw_data (list): The unprocessed data to get target from the request
  
      Returns:
          dict : A dictionary response with the explanations response.
      """
      output_explain = None
      inputs = None
      target = 0
  
      logger.info("Calculating Explanations")
      row = raw_data[0]
      if isinstance(row, dict):
          logger.info("Getting data and target")
          inputs = row.get("data") or row.get("body")
          target = row.get("target")
          if not target:
              target = 0
  
      output_explain = self.get_insights(
          data_preprocess, inputs, target
      )
      return output_explain
  
imports: import abc
  import importlib.util
  import logging
  import os
  import time
  import torch
  from pkg_resources import packaging
  from ts.handler_utils.timer import timed
  from ..utils.util import check_valid_pt2_backend, list_classes_from_module, load_label_mapping
label_desc: Use image node_id 12 for calling the BaseHandler obj's underlying member method code with example usage: obj.explain_handle(data_preprocess, raw_data) and returns: output_explain