class_docstr: Pyramid Pooling Module (PPM) used in PSPNet.
  
  Args:
      pool_scales (`Tuple[int]`):
          Pooling scales used in Pooling Pyramid Module.
      in_channels (`int`):
          Input channels.
      channels (`int`):
          Channels after modules, before conv_seg.
      align_corners (`bool`):
          align_corners argument of F.interpolate.
code: def __init__(
      self,
      pool_scales: Tuple[int, ...],
      in_channels: int,
      channels: int,
      align_corners: bool,
  ) -> None:
      super().__init__()
      self.pool_scales = pool_scales
      self.align_corners = align_corners
      self.in_channels = in_channels
      self.channels = channels
      self.blocks = []
      for i, pool_scale in enumerate(pool_scales):
          block = UperNetPyramidPoolingBlock(
              pool_scale=pool_scale,
              in_channels=in_channels,
              channels=channels,
          )
          self.blocks.append(block)
          self.add_module(str(i), block)
  
imports: from typing import List, Optional, Tuple, Union
  import torch
  from torch import nn
  from torch.nn import CrossEntropyLoss
  from ...None import AutoBackbone
  from ...modeling_outputs import SemanticSegmenterOutput
  from ...modeling_utils import PreTrainedModel
  from ...utils import add_start_docstrings, add_start_docstrings_to_model_forward, replace_return_docstrings
  from .configuration_upernet import UperNetConfig
label_desc: Use image node_id 1 to create a new UperNetPyramidPoolingModule object from inherited base classes: nn with example: obj = UperNetPyramidPoolingModule(pool_scales, in_channels, channels, align_corners)