SpaceToDepth update spec (#6426)

* SpaceToDepth update spec

* fix T to be italic

* add spaces around `/`

* fix **Required.**
This commit is contained in:
Patryk Elszkowski 2021-07-02 17:22:46 +02:00 committed by GitHub
parent 21d060ac2b
commit 06013d1596
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,37 +6,10 @@
**Short description**: *SpaceToDepth* operation rearranges data from the spatial dimensions of the input tensor into depth dimension of the output tensor.
**Attributes**
* *block_size*
* **Description**: *block_size* specifies the size of the value block to be moved. The depth dimension size must be evenly divided by `block_size ^ (len(input.shape) - 2)`.
* **Range of values**: a positive integer
* **Type**: `int`
* **Default value**: 1
* **Required**: *no*
* *mode*
* **Description**: specifies how the output depth dimension is gathered from block coordinates and the old depth dimension.
* **Range of values**:
* *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]`
* **Type**: `string`
* **Default value**: None
* **Required**: *yes*
**Inputs**
* **1**: `data` - input tensor of any type with rank >= 3. Required.
**Outputs**
* **1**: permuted tensor with shape `[N, C * (block_size ^ K), D1 / block_size, D2 / block_size, ..., DK / block_size]`.
**Detailed description**
*SpaceToDepth* operation permutes element from the input tensor with shape `[N, C, D1, D2, ..., DK]`, to the output tensor where values from the input spatial dimensions `D1, D2, ..., DK` are moved to the new depth dimension. Refer to the [ONNX* specification](https://github.com/onnx/onnx/blob/master/docs/Operators.md#SpaceToDepth) for an example of the 4D input tensor case.
*SpaceToDepth* operation permutes element from the input tensor with shape `[N, C, D1, D2, ..., DK]`, to the output tensor where values from the input spatial dimensions `D1, D2, ..., DK` are moved to the new depth dimension.
The operation is equivalent to the following transformation of the input tensor `data` with `K` spatial dimensions of shape `[N, C, D1, D2, ..., DK]` to *Y* output tensor. If `mode = blocks_first`:
@ -54,6 +27,37 @@ If `mode = depth_first`:
y = reshape(x'', [N, C * (block_size ^ K), D1 / block_size, D2 / block_size, ..., DK / block_size])
**Attributes**
* *block_size*
* **Description**: specifies the size of the value block to be moved. The spatial dimensions must be evenly divided by `block_size`.
* **Range of values**: a positive integer
* **Type**: `int`
* **Default value**: 1
* **Required**: *no*
* *mode*
* **Description**: specifies how the output depth dimension is gathered from block coordinates and the old depth dimension.
* **Range of values**:
* *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]`
* **Type**: `string`
* **Default value**: None
* **Required**: *yes*
**Inputs**
* **1**: `data` - input tensor of type *T* with rank >= 3. **Required.**
**Outputs**
* **1**: permuted tensor of type *T* and shape `[N, C * (block_size ^ K), D1 / block_size, D2 / block_size, ..., DK / block_size]`.
**Types**
* *T*: any supported type.
**Example**