class_docstr: Provides an interface to perform backpropagation.
  
  This class provids a way to calculate the gradients of a target class
  output w.r.t. an input image, by performing a single backprobagation.
  
  The gradients obtained can be used to visualise an image-specific class
  saliency map, which can gives some intuition on regions within the input
  image that contribute the most (and least) to the corresponding output.
  
  More details on saliency maps: `Deep Inside Convolutional Networks:
  Visualising Image Classification Models and Saliency Maps
  <https://arxiv.org/pdf/1312.6034.pdf>`_.
  
  Args:
      model: A neural network model from `torchvision.models
          <https://pytorch.org/docs/stable/torchvision/models.html>`_.
class_docstr_tok: ["Provides","an","interface","to","perform","backpropagation",".","This","class","provids","a","way","to","calculate","the","gradients","of","a","target","class","output","w.r.t",".","an","input","image",",","by","performing","a","single","backprobagation",".","The","gradients","obtained","can","be","used","to","visualise","an","image-specific","class","saliency","map",",","which","can","gives","some","intuition","on","regions","within","the","input","image","that","contribute","the","most","(","and","least",")","to","the","corresponding","output",".","More","details","on","saliency","maps",":","`","Deep","Inside","Convolutional","Networks",":","Visualising","Image","Classification","Models","and","Saliency","Maps","<","https",":","\/\/arxiv.org\/pdf\/1312.6034.pdf",">","`","_",".","Args",":","model",":","A","neural","network","model","from","`","torchvision.models","<","https",":","\/\/pytorch.org\/docs\/stable\/torchvision\/models.html",">","`","_","."]
code: def _register_relu_hooks(self):
      def _record_output(module, input_, output):
          self.relu_outputs.append(output)
  
      def _clip_gradients(module, grad_in, grad_out):
          relu_output = self.relu_outputs.pop()
          clippled_grad_out = grad_out[0].clamp(0.0)
  
          return (clippled_grad_out.mul(relu_output),)
  
      for _, module in self.model.named_modules():
          if isinstance(module, nn.ReLU):
              module.register_forward_hook(_record_output)
              module.register_backward_hook(_clip_gradients)
  
file_path: flashtorch/flashtorch/saliency/backprop.py
imports: import warnings
  import matplotlib.pyplot
  import torch
  import torch.nn
  from flashtorch.utils import denormalize, format_for_plotting, standardize_and_clip
label_desc: Use image node_id 5 for calling the Backprop obj's underlying member method code with example usage: obj._register_relu_hooks() and returns: clippled_grad_out