docstr: Computes attribution by overriding relu gradients. Based on constructor
  flag use_relu_grad_output, performs either GuidedBackpropagation if False
  and Deconvolution if True. This class is the parent class of both these
  methods, more information on usage can be found in the docstrings for each
  implementing class.
docstr_tok: ["Computes","attribution","by","overriding","relu","gradients",".","Based","on","constructor","flag","use_relu_grad_output",",","performs","either","GuidedBackpropagation","if","False","and","Deconvolution","if","True",".","This","class","is","the","parent","class","of","both","these","methods",",","more","information","on","usage","can","be","found","in","the","docstrings","for","each","implementing","class","."]
code: def attribute(
      self,
      inputs: TensorOrTupleOfTensorsGeneric,
      target: TargetType = None,
      additional_forward_args: Any = None,
  ) -> TensorOrTupleOfTensorsGeneric:
      r"""
      Computes attribution by overriding relu gradients. Based on constructor
      flag use_relu_grad_output, performs either GuidedBackpropagation if False
      and Deconvolution if True. This class is the parent class of both these
      methods, more information on usage can be found in the docstrings for each
      implementing class.
      """
  
      # Keeps track whether original input is a tuple or not before
      # converting it into a tuple.
      is_inputs_tuple = _is_tuple(inputs)
  
      inputs = _format_tensor_into_tuples(inputs)
      gradient_mask = apply_gradient_requirements(inputs)
  
      # set hooks for overriding ReLU gradients
      warnings.warn(
          "Setting backward hooks on ReLU activations."
          "The hooks will be removed after the attribution is finished"
      )
      try:
          self.model.apply(self._register_hooks)
  
          gradients = self.gradient_func(
              self.forward_func, inputs, target, additional_forward_args
          )
      finally:
          self._remove_hooks()
  
      undo_gradient_requirements(inputs, gradient_mask)
      return _format_output(is_inputs_tuple, gradients)
  
imports: import warnings
  from typing import Any, List, Tuple, Union
  import torch
  import torch.nn.functional
  from captum._utils.common import _format_output, _format_tensor_into_tuples, _is_tuple, _register_backward_hook
  from captum._utils.gradient import apply_gradient_requirements, undo_gradient_requirements
  from captum._utils.typing import TargetType, TensorOrTupleOfTensorsGeneric
  from captum.attr._utils.attribution import GradientAttribution
  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 2 for calling the ModifiedReluGradientAttribution obj's underlying member method code with example usage: obj.attribute(inputs, target, additional_forward_args) and returns: _format_output