tf.space_to_batch

View source on GitHub

SpaceToBatch for N-D tensors of type T.

tf.space_to_batch(
    input, block_shape, paddings, name=None
)

This operation divides "spatial" dimensions [1, ..., M] of the input into a grid of blocks of shape block_shape, and interleaves these blocks with the "batch" dimension (0) such that in the output, the spatial dimensions [1, ..., M] correspond to the position within the grid, and the batch dimension combines both the position within a spatial block and the original batch position. Prior to division into blocks, the spatial dimensions of the input are optionally zero padded according to paddings. See below for a precise description.

Args:

Returns:

A Tensor. Has the same type as input.