spaceToDepth function
Rearranges blocks of spatial data, into depth.
More specifically, it outputs a copy of the input variable where values from the height and width dimensions are moved to the depth dimension.
The block_size indicates the input block size.
Non-overlapping blocks of size block_size x block_size are rearranged into depth at each location.
The depth of the output variable is block_size * block_size * input_depth.
The Y, X coordinates within each block of the input become the high order component of the output channel index.
The input variable's height and width must be divisible by block_size
Args:
- input: A variable.
- block_size: An int that is >= 2. The size of the spatial block.
Returns:
- A variable. Has the same type as input.
Implementation
VARP spaceToDepth(VARP input, int blockSize) =>
VARP.fromPointer(C.mnn_expr_SpaceToDepth(input.ptr, blockSize));