class_docstr: Space to depth transformation.
class_docstr_tok: ["Space","to","depth","transformation","."]
code: def forward(self, inputs):
      (X,) = inputs
      xp = backend.get_array_module(X)
      bsize, c, a, b = X.shape
      X = xp.reshape(
          X, (bsize, c, a // self.r, self.r, b // self.r, self.r)
      )
      X = xp.transpose(X, (0, 3, 5, 1, 2, 4))
      X = xp.reshape(
          X, (bsize, self.r**2 * c, a // self.r, b // self.r)
      )
      return (X,)
  
file_path: chainer/chainer/functions/array/space2depth.py
imports: 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 Space2Depth obj's underlying member method code with example usage: obj.forward(inputs) and returns: X