class_docstr: Selectable global pooling layer with dynamic input kernel size
      
class_docstr_tok: ["Selectable","global","pooling","layer","with","dynamic","input","kernel","size"]
code: def forward(self, x):
      if self.pool_type == "avgmaxc":
          x = torch.cat([p(x) for p in self.pool], dim=1)
      elif self.pool_type == "avgmax":
          x = 0.5 * torch.sum(
              torch.stack([p(x) for p in self.pool]), 0
          ).squeeze(dim=0)
      else:
          x = self.pool(x)
      return x
  
file_path: pywick/pywick/models/classification/dpn/adaptive_avgmax_pool.py
imports: import torch
  import torch.nn
  import torch.nn.functional
label_desc: Use image node_id 2 for calling the AdaptiveAvgMaxPool2d obj's underlying member method code with example usage: obj.forward(x) and returns: x