# SpaceToDepth¶

## SpaceToDepth - 13¶

### Version¶

• domain: main

• since_version: 13

• function: False

• support_level: SupportType.COMMON

• shape inference: True

This version of the operator has been available since version 13.

### Summary¶

SpaceToDepth rearranges blocks of spatial data into depth. More specifically, this op outputs a copy of the input tensor where values from the height and width dimensions are moved to the depth dimension.

### Attributes¶

• blocksize - INT (required) :

Blocks of [blocksize, blocksize] are moved.

### Inputs¶

• input (heterogeneous) - T:

Input tensor of [N,C,H,W], where N is the batch axis, C is the channel or depth, H is the height and W is the width.

### Outputs¶

• output (heterogeneous) - T:

Output tensor of [N, C * blocksize * blocksize, H/blocksize, W/blocksize].

### Type Constraints¶

• T in ( tensor(bfloat16), tensor(bool), tensor(complex128), tensor(complex64), tensor(double), tensor(float), tensor(float16), tensor(int16), tensor(int32), tensor(int64), tensor(int8), tensor(string), tensor(uint16), tensor(uint32), tensor(uint64), tensor(uint8) ):

Constrain input and output types to all tensor types.

## SpaceToDepth - 1¶

### Version¶

• domain: main

• since_version: 1

• function: False

• support_level: SupportType.COMMON

• shape inference: True

This version of the operator has been available since version 1.

### Summary¶

SpaceToDepth rearranges blocks of spatial data into depth. More specifically, this op outputs a copy of the input tensor where values from the height and width dimensions are moved to the depth dimension.

### Attributes¶

• blocksize - INT (required) :

Blocks of [blocksize, blocksize] are moved.

### Inputs¶

• input (heterogeneous) - T:

Input tensor of [N,C,H,W], where N is the batch axis, C is the channel or depth, H is the height and W is the width.

### Outputs¶

• output (heterogeneous) - T:

Output tensor of [N, C * blocksize * blocksize, H/blocksize, W/blocksize].

### Type Constraints¶

• T in ( tensor(bool), tensor(complex128), tensor(complex64), tensor(double), tensor(float), tensor(float16), tensor(int16), tensor(int32), tensor(int64), tensor(int8), tensor(string), tensor(uint16), tensor(uint32), tensor(uint64), tensor(uint8) ):

Constrain input and output types to all tensor types.