class_docstr: Implements DeepLIFT algorithm for the layer based on the following paper:
  Learning Important Features Through Propagating Activation Differences,
  Avanti Shrikumar, et. al.
  https://arxiv.org/abs/1704.02685
  
  and the gradient formulation proposed in:
  Towards better understanding of gradient-based attribution methods for
  deep neural networks,  Marco Ancona, et.al.
  https://openreview.net/pdf?id=Sy21R9JAW
  
  This implementation supports only Rescale rule. RevealCancel rule will
  be supported in later releases.
  Although DeepLIFT's(Rescale Rule) attribution quality is comparable with
  Integrated Gradients, it runs significantly faster than Integrated
  Gradients and is preferred for large datasets.
  
  Currently we only support a limited number of non-linear activations
  but the plan is to expand the list in the future.
  
  Note: As we know, currently we cannot access the building blocks,
  of PyTorch's built-in LSTM, RNNs and GRUs such as Tanh and Sigmoid.
  Nonetheless, it is possible to build custom LSTMs, RNNS and GRUs
  with performance similar to built-in ones using TorchScript.
  More details on how to build custom RNNs can be found here:
  https://pytorch.org/blog/optimizing-cuda-rnn-with-torchscript/
class_docstr_tok: ["Implements","DeepLIFT","algorithm","for","the","layer","based","on","the","following","paper",":","Learning","Important","Features","Through","Propagating","Activation","Differences",",","Avanti","Shrikumar",",","et",".","al",".","https",":","\/\/arxiv.org\/abs\/1704.02685","and","the","gradient","formulation","proposed","in",":","Towards","better","understanding","of","gradient-based","attribution","methods","for","deep","neural","networks",",","Marco","Ancona",",","et.al",".","https",":","\/\/openreview.net\/pdf","?","id=Sy21R9JAW","This","implementation","supports","only","Rescale","rule",".","RevealCancel","rule","will","be","supported","in","later","releases",".","Although","DeepLIFT","'s","(","Rescale","Rule",")","attribution","quality","is","comparable","with","Integrated","Gradients",",","it","runs","significantly","faster","than","Integrated","Gradients","and","is","preferred","for","large","datasets",".","Currently","we","only","support","a","limited","number","of","non-linear","activations","but","the","plan","is","to","expand","the","list","in","the","future",".","Note",":","As","we","know",",","currently","we","can","not","access","the","building","blocks",",","of","PyTorch","'s","built-in","LSTM",",","RNNs","and","GRUs","such","as","Tanh","and","Sigmoid",".","Nonetheless",",","it","is","possible","to","build","custom","LSTMs",",","RNNS","and","GRUs","with","performance","similar","to","built-in","ones","using","TorchScript",".","More","details","on","how","to","build","custom","RNNs","can","be","found","here",":","https",":","\/\/pytorch.org\/blog\/optimizing-cuda-rnn-with-torchscript\/"]
code: def attribute(
      self,
      inputs: Union[Tensor, Tuple[Tensor, ...]],
      baselines: BaselineType = None,
      target: TargetType = None,
      additional_forward_args: Any = None,
      return_convergence_delta: Literal[False] = False,
      attribute_to_layer_input: bool = False,
      custom_attribution_func: Union[
          None, Callable[..., Tuple[Tensor, ...]]
      ] = None,
  ) -> Union[Tensor, Tuple[Tensor, ...]]:
      ...
  
imports: import typing
  from typing import Any, Callable, cast, Sequence, Tuple, Union
  import torch
  from captum._utils.common import _expand_target, _format_additional_forward_args, _format_baseline, _format_tensor_into_tuples, ExpansionTypes
  from captum._utils.gradient import compute_layer_gradients_and_eval
  from captum._utils.typing import BaselineType, Literal, TargetType, TensorOrTupleOfTensorsGeneric
  from captum.attr._core.deep_lift import DeepLift, DeepLiftShap
  from captum.attr._utils.attribution import LayerAttribution
  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
label_desc: Use image node_id 2 for calling the LayerDeepLift obj's underlying member method code with example usage: obj.attribute(inputs, baselines, target, additional_forward_args, return_convergence_delta, attribute_to_layer_input, custom_attribution_func) without return types