ngraph.space_to_depth

ngraph.space_to_depth(data: _pyngraph.Node, mode: str, block_size: int = 1, name: Optional[str] = None) _pyngraph.Node

Perform SpaceToDepth operation on the input tensor.

SpaceToDepth rearranges blocks of spatial data into depth. The operator returns a copy of the input tensor where values from the height and width dimensions are moved to the depth dimension.

Parameters
  • data – The node with data tensor.

  • mode

    Specifies how the output depth dimension is gathered from block coordinates.

    blocks_first: The output depth is gathered from [block_size, …, block_size, C] depth_first: The output depth is gathered from [C, block_size, …, block_size]

  • block_size – The size of the block of values to be moved. Scalar value.

  • name – Optional output node name.

Returns

The new node performing a SpaceToDepth operation on input tensor.