class_docstr: Depth to space transformation.
code: def forward(self, inputs):
      (X,) = inputs
      xp = backend.get_array_module(X)
      bsize, c, a, b = X.shape
      c //= self.r**2
  
      if xp is numpy:
          # These codes run faster on CPU than below `else` block codes.
          X = xp.transpose(X, (0, 2, 3, 1))
          X = xp.reshape(X, (bsize, a, b, self.r, self.r, c))
          X = xp.transpose(X, (0, 1, 3, 2, 4, 5))
          X = xp.reshape(X, (bsize, a * self.r, b * self.r, c))
          X = xp.transpose(X, (0, 3, 1, 2))
      else:
          X = xp.reshape(X, (bsize, self.r, self.r, c, a, b))
          X = xp.transpose(X, (0, 3, 4, 1, 5, 2))
          X = xp.reshape(X, (bsize, c, a * self.r, b * self.r))
      return (X,)
  
file_path: chainer/chainer/functions/array/depth2space.py
imports: import numpy
  import chainer
  from chainer import backend
  from chainer import function_node
  from chainer.utils import type_check
label_desc: Use image node_id 3 for calling the Depth2Space obj's underlying member method code with example usage: obj.forward(inputs) and returns: X