class_docstr: Computes attribution of the given neuron using deconvolution.
  Deconvolution computes the gradient of the target output with
  respect to the input, but gradients of ReLU functions are overridden so
  that the gradient of the ReLU input is simply computed taking ReLU of
  the output gradient, essentially only propagating non-negative gradients
  (without dependence on the sign of the ReLU input).
  
  More details regarding the deconvolution algorithm can be found
  in these papers:
  https://arxiv.org/abs/1311.2901
  https://link.springer.com/chapter/10.1007/978-3-319-46466-4_8
  
  Warning: Ensure that all ReLU operations in the forward function of the
  given model are performed using a module (nn.module.ReLU).
  If nn.functional.ReLU is used, gradients are not overridden appropriately.
class_docstr_tok: ["Computes","attribution","of","the","given","neuron","using","deconvolution",".","Deconvolution","computes","the","gradient","of","the","target","output","with","respect","to","the","input",",","but","gradients","of","ReLU","functions","are","overridden","so","that","the","gradient","of","the","ReLU","input","is","simply","computed","taking","ReLU","of","the","output","gradient",",","essentially","only","propagating","non-negative","gradients","(","without","dependence","on","the","sign","of","the","ReLU","input",")",".","More","details","regarding","the","deconvolution","algorithm","can","be","found","in","these","papers",":","https",":","\/\/arxiv.org\/abs\/1311.2901","https",":","\/\/link.springer.com\/chapter\/10.1007\/978-3-319-46466-4_8","Warning",":","Ensure","that","all","ReLU","operations","in","the","forward","function","of","the","given","model","are","performed","using","a","module","(","nn.module.ReLU",")",".","If","nn.functional.ReLU","is","used",",","gradients","are","not","overridden","appropriately","."]
docstr: Args:
  
      model (nn.Module):  The reference to PyTorch model instance.
      layer (Module): Layer for which attributions are computed.
                    Output size of attribute matches this layer's input or
                    output dimensions, depending on whether we attribute to
                    the inputs or outputs of the layer, corresponding to
                    attribution of each neuron in the input or output of
                    this layer.
                    Currently, it is assumed that the inputs or the outputs
                    of the layer, depending on which one is used for
                    attribution, can only be a single tensor.
      device_ids (list[int]): Device ID list, necessary only if model
                    applies a DataParallel model. This allows reconstruction of
                    intermediate outputs from batched results across devices.
                    If model is given as the DataParallel model itself,
                    then it is not necessary to provide this argument.
docstr_tok: ["Args",":","model","(","nn.Module",")",":","The","reference","to","PyTorch","model","instance",".","layer","(","Module",")",":","Layer","for","which","attributions","are","computed",".","Output","size","of","attribute","matches","this","layer","'s","input","or","output","dimensions",",","depending","on","whether","we","attribute","to","the","inputs","or","outputs","of","the","layer",",","corresponding","to","attribution","of","each","neuron","in","the","input","or","output","of","this","layer",".","Currently",",","it","is","assumed","that","the","inputs","or","the","outputs","of","the","layer",",","depending","on","which","one","is","used","for","attribution",",","can","only","be","a","single","tensor",".","device_ids","(","list","[","int","]",")",":","Device","ID","list",",","necessary","only","if","model","applies","a","DataParallel","model",".","This","allows","reconstruction","of","intermediate","outputs","from","batched","results","across","devices",".","If","model","is","given","as","the","DataParallel","model","itself",",","then","it","is","not","necessary","to","provide","this","argument","."]
code: def __init__(
      self,
      model: Module,
      layer: Module,
      device_ids: Union[None, List[int]] = None,
  ) -> None:
      r"""
      Args:
  
          model (nn.Module):  The reference to PyTorch model instance.
          layer (Module): Layer for which attributions are computed.
                        Output size of attribute matches this layer's input or
                        output dimensions, depending on whether we attribute to
                        the inputs or outputs of the layer, corresponding to
                        attribution of each neuron in the input or output of
                        this layer.
                        Currently, it is assumed that the inputs or the outputs
                        of the layer, depending on which one is used for
                        attribution, can only be a single tensor.
          device_ids (list[int]): Device ID list, necessary only if model
                        applies a DataParallel model. This allows reconstruction of
                        intermediate outputs from batched results across devices.
                        If model is given as the DataParallel model itself,
                        then it is not necessary to provide this argument.
      """
      NeuronAttribution.__init__(self, model, layer, device_ids)
      GradientAttribution.__init__(self, model)
      self.deconv = Deconvolution(model)
  
file_path: captum/captum/attr/_core/neuron/neuron_guided_backprop_deconvnet.py
imports: from typing import Any, Callable, List, Tuple, Union
  from captum._utils.gradient import construct_neuron_grad_fn
  from captum._utils.typing import TensorOrTupleOfTensorsGeneric
  from captum.attr._core.guided_backprop_deconvnet import Deconvolution, GuidedBackprop
  from captum.attr._utils.attribution import GradientAttribution, NeuronAttribution
  from captum.log import log_usage
  from torch.nn import Module
label_desc: Use image node_id 1 to create a new NeuronDeconvolution object from inherited base classes: NeuronAttribution, GradientAttribution with example: obj = NeuronDeconvolution(model, layer, device_ids)