class_docstr: Applies a 2D power-average adaptive pooling over an input signal composed of several input planes.
  The function computed is: :math:`f(X) = pow(sum(pow(X, p)), 1/p)`
      - At p = infinity, one gets Max Pooling
      - At p = 1, one gets Average Pooling
  The output is of size H x W, for any input size.
  The number of output features is equal to the number of input planes.
  Args:
      output_size: the target output size of the image of the form H x W.
                   Can be a tuple (H, W) or a single H for a square image H x H
                   H and W can be either a ``int``, or ``None`` which means the size will
                   be the same as that of the input.
class_docstr_tok: ["Applies","a","2D","power-average","adaptive","pooling","over","an","input","signal","composed","of","several","input","planes",".","The","function","computed","is",":",":","math",":","`","f","(","X",")","=","pow","(","sum","(","pow","(","X",",","p",")",")",",","1\/p",")","`","-","At","p","=","infinity",",","one","gets","Max","Pooling","-","At","p","=","1",",","one","gets","Average","Pooling","The","output","is","of","size","H","x","W",",","for","any","input","size",".","The","number","of","output","features","is","equal","to","the","number","of","input","planes",".","Args",":","output_size",":","the","target","output","size","of","the","image","of","the","form","H","x","W.","Can","be","a","tuple","(","H",",","W",")","or","a","single","H","for","a","square","image","H","x","H","H","and","W","can","be","either","a","``","int","``",",","or","``","None","``","which","means","the","size","will","be","the","same","as","that","of","the","input","."]
code: def forward(self, x):
      x = x.clamp(min=self.eps).pow(self.p)
      return torch.nn.functional.adaptive_avg_pool2d(
          x, self.output_size
      ).pow(1.0 / self.p)
  
imports: import torch
  from torch import nn
label_desc: Use image node_id 2 for calling the GeneralizedMeanPooling obj's underlying member method code with example usage: obj.forward(x) and returns: torch