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_inverse(self, layer_instance, relevance_in):
      # In case the output had been reshaped for a linear layer,
      # make sure the relevance is put into the same shape as before.
      relevance_in = relevance_in.view(layer_instance.out_shape)
  
      invert_pool = self.get_inv_max_pool_method(layer_instance)
      inverted = invert_pool(
          relevance_in,
          layer_instance.indices,
          layer_instance.kernel_size,
          layer_instance.stride,
          layer_instance.padding,
          output_size=layer_instance.in_shape,
      )
      del layer_instance.indices
  
      return inverted
  
imports: import torch
  import torch.nn
  import numpy
  import torch.nn.functional
label_desc: Use image node_id 11 for calling the RelevancePropagator obj's underlying member method code with example usage: obj.max_pool_nd_inverse(layer_instance, relevance_in) and returns: inverted