class_docstr: Extends DeepLift algorithm and approximates SHAP values using Deeplift.
  For each input sample it computes DeepLift attribution with respect to
  each baseline and averages resulting attributions.
  More details about the algorithm can be found here:
  
  https://papers.nips.cc/paper/7062-a-unified-approach-to-interpreting-model-predictions.pdf
  
  Note that the explanation model:
  
      1. Assumes that input features are independent of one another
      2. Is linear, meaning that the explanations are modeled through
          the additive composition of feature effects.
  
  Although, it assumes a linear model for each explanation, the overall
  model across multiple explanations can be complex and non-linear.
class_docstr_tok: ["Extends","DeepLift","algorithm","and","approximates","SHAP","values","using","Deeplift",".","For","each","input","sample","it","computes","DeepLift","attribution","with","respect","to","each","baseline","and","averages","resulting","attributions",".","More","details","about","the","algorithm","can","be","found","here",":","https",":","\/\/papers.nips.cc\/paper\/7062-a-unified-approach-to-interpreting-model-predictions.pdf","Note","that","the","explanation","model",":","1",".","Assumes","that","input","features","are","independent","of","one","another","2",".","Is","linear",",","meaning","that","the","explanations","are","modeled","through","the","additive","composition","of","feature","effects",".","Although",",","it","assumes","a","linear","model","for","each","explanation",",","the","overall","model","across","multiple","explanations","can","be","complex","and","non-linear","."]
docstr: Args:
  
      model (nn.Module):  The reference to PyTorch model instance.
      multiply_by_inputs (bool, optional): Indicates whether to factor
                  model inputs' multiplier in the final attribution scores.
                  In the literature this is also known as local vs global
                  attribution. If inputs' multiplier isn't factored in
                  then that type of attribution method is also called local
                  attribution. If it is, then that type of attribution
                  method is called global.
                  More detailed can be found here:
                  https://arxiv.org/abs/1711.06104
  
                  In case of DeepLiftShap, if `multiply_by_inputs`
                  is set to True, final sensitivity scores
                  are being multiplied by (inputs - baselines).
                  This flag applies only if `custom_attribution_func` is
                  set to None.
docstr_tok: ["Args",":","model","(","nn.Module",")",":","The","reference","to","PyTorch","model","instance",".","multiply_by_inputs","(","bool",",","optional",")",":","Indicates","whether","to","factor","model","inputs","'","multiplier","in","the","final","attribution","scores",".","In","the","literature","this","is","also","known","as","local","vs","global","attribution",".","If","inputs","'","multiplier","is","n't","factored","in","then","that","type","of","attribution","method","is","also","called","local","attribution",".","If","it","is",",","then","that","type","of","attribution","method","is","called","global",".","More","detailed","can","be","found","here",":","https",":","\/\/arxiv.org\/abs\/1711.06104","In","case","of","DeepLiftShap",",","if","`","multiply_by_inputs","`","is","set","to","True",",","final","sensitivity","scores","are","being","multiplied","by","(","inputs","-","baselines",")",".","This","flag","applies","only","if","`","custom_attribution_func","`","is","set","to","None","."]
code: def __init__(
      self, model: Module, multiply_by_inputs: bool = True
  ) -> None:
      r"""
      Args:
  
          model (nn.Module):  The reference to PyTorch model instance.
          multiply_by_inputs (bool, optional): Indicates whether to factor
                      model inputs' multiplier in the final attribution scores.
                      In the literature this is also known as local vs global
                      attribution. If inputs' multiplier isn't factored in
                      then that type of attribution method is also called local
                      attribution. If it is, then that type of attribution
                      method is called global.
                      More detailed can be found here:
                      https://arxiv.org/abs/1711.06104
  
                      In case of DeepLiftShap, if `multiply_by_inputs`
                      is set to True, final sensitivity scores
                      are being multiplied by (inputs - baselines).
                      This flag applies only if `custom_attribution_func` is
                      set to None.
      """
      DeepLift.__init__(
          self, model, multiply_by_inputs=multiply_by_inputs
      )
  
imports: import typing
  import warnings
  from typing import Any, Callable, cast, List, Tuple, Union
  import torch
  import torch.nn
  import torch.nn.functional
  from captum._utils.common import _expand_additional_forward_args, _expand_target, _format_additional_forward_args, _format_baseline, _format_output, _format_tensor_into_tuples, _is_tuple, _register_backward_hook, _run_forward, _select_targets, ExpansionTypes
  from captum._utils.gradient import apply_gradient_requirements, undo_gradient_requirements
  from captum._utils.typing import BaselineType, Literal, TargetType, TensorOrTupleOfTensorsGeneric
  from captum.attr._utils.attribution import GradientAttribution
  from captum.attr._utils.common import _call_custom_attribution_func, _compute_conv_delta_and_format_attrs, _format_callable_baseline, _tensorize_baseline, _validate_input
  from captum.log import log_usage
  from torch import Tensor
  from torch.nn import Module
  from torch.utils.hooks import RemovableHandle
label_desc: Use image node_id 1 to create a new DeepLiftShap object from inherited base classes: DeepLift with example: obj = DeepLiftShap(model, multiply_by_inputs)