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","."]
docstr: Get dimension-specific max_pooling layer.
  The forward pass and inversion are made in a
  'dimensionality-agnostic' manner and are the same for
  all nd instances of the layer, except for the functional
  that needs to be used.
  
  Args:
      max_pool_instance: instance of max_pool layer.
  
  Returns:
      The correct functional used in the max_pooling layer.
docstr_tok: ["Get","dimension-specific","max_pooling","layer",".","The","forward","pass","and","inversion","are","made","in","a","'dimensionality-agnostic","'","manner","and","are","the","same","for","all","nd","instances","of","the","layer",",","except","for","the","functional","that","needs","to","be","used",".","Args",":","max_pool_instance",":","instance","of","max_pool","layer",".","Returns",":","The","correct","functional","used","in","the","max_pooling","layer","."]
code: def get_inv_max_pool_method(max_pool_instance):
      """
      Get dimension-specific max_pooling layer.
      The forward pass and inversion are made in a
      'dimensionality-agnostic' manner and are the same for
      all nd instances of the layer, except for the functional
      that needs to be used.
  
      Args:
          max_pool_instance: instance of max_pool layer.
  
      Returns:
          The correct functional used in the max_pooling layer.
  
      """
  
      conv_func_mapper = {
          torch.nn.MaxPool1d: F.max_unpool1d,
          torch.nn.MaxPool2d: F.max_unpool2d,
          torch.nn.MaxPool3d: F.max_unpool3d,
      }
      return conv_func_mapper[type(max_pool_instance)]
  
imports: import torch
  import torch.nn
  import numpy
  import torch.nn.functional
label_desc: Use image node_id 8 for calling the RelevancePropagator obj's underlying member method code with example usage: obj.get_inv_max_pool_method(max_pool_instance) and returns: conv_func_mapper