class_docstr: Upsample via using a subpixel CNN. This module supports 1D, 2D and 3D input images.
  The module is consisted with two parts. First of all, a convolutional layer is employed
  to increase the number of channels into: ``in_channels * (scale_factor ** dimensions)``.
  Secondly, a pixel shuffle manipulation is utilized to aggregates the feature maps from
  low resolution space and build the super resolution space.
  The first part of the module is not fixed, a sequential layers can be used to replace the
  default single layer.
  
  See: Shi et al., 2016, "Real-Time Single Image and Video Super-Resolution
  Using a nEfficient Sub-Pixel Convolutional Neural Network."
  
  See: Aitken et al., 2017, "Checkerboard artifact free sub-pixel convolution".
  
  The idea comes from:
  https://arxiv.org/abs/1609.05158
  
  The pixel shuffle mechanism refers to:
  https://pytorch.org/docs/stable/generated/torch.nn.PixelShuffle.html#torch.nn.PixelShuffle.
  and:
  https://github.com/pytorch/pytorch/pull/6340.
docstr: Args:
      x: Tensor in shape (batch, channel, spatial_1[, spatial_2, ...).
docstr_tok: ["Args",":","x",":","Tensor","in","shape","(","batch",",","channel",",","spatial_1","[",",","spatial_2",",","...",")","."]
code: def forward(self, x: torch.Tensor) -> torch.Tensor:
      """
      Args:
          x: Tensor in shape (batch, channel, spatial_1[, spatial_2, ...).
      """
      x = self.conv_block(x)
      if x.shape[1] % (self.scale_factor**self.dimensions) != 0:
          raise ValueError(
              f"Number of channels after `conv_block` ({x.shape[1]}) must be evenly "
              "divisible by scale_factor ** dimensions "
              f"({self.scale_factor}^{self.dimensions}={self.scale_factor**self.dimensions})."
          )
      x = pixelshuffle(x, self.dimensions, self.scale_factor)
      x = self.pad_pool(x)
      return x
  
file_path: MONAI/monai/networks/blocks/upsample.py
imports: from __future__ import annotations
  from collections.abc import Sequence
  import torch
  import torch.nn
  from monai.networks.layers.factories import Conv, Pad, Pool
  from monai.networks.utils import icnr_init, pixelshuffle
  from monai.utils import InterpolateMode, UpsampleMode, ensure_tuple_rep, look_up_option
label_desc: Use image node_id 2 for calling the SubpixelUpsample obj's underlying member method code with example usage: obj.forward(x) and returns: x