class_docstr: Class for computing the relevance propagation and supplying
  the necessary forward hooks for all layers.
class_docstr_tok: ["Class","for","computing","the","relevance","propagation","and","supplying","the","necessary","forward","hooks","for","all","layers","."]
code: def max_pool_nd_fwd_hook(
      self, m, in_tensor: torch.Tensor, out_tensor: torch.Tensor
  ):
      # Ignore unused for pylint
      _ = self
  
      # Save the return indices value to make sure
      tmp_return_indices = bool(m.return_indices)
      m.return_indices = True
      _, indices = m.forward(in_tensor[0])
      m.return_indices = tmp_return_indices
      setattr(m, "indices", indices)
      setattr(m, "out_shape", out_tensor.size())
      setattr(m, "in_shape", in_tensor[0].size())
  
imports: import torch
  import torch.nn
  import numpy
  import torch.nn.functional
label_desc: Use image node_id 12 for calling the RelevancePropagator obj's underlying member method code with example usage: obj.max_pool_nd_fwd_hook(m, in_tensor, out_tensor) without return types