Squeeze specification refactoring (#5030)

This commit is contained in:
Bartosz Lesniewski 2021-03-31 13:09:25 +02:00 committed by GitHub
parent e05e05ccf3
commit c49564c93e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,15 +4,19 @@
**Category**: Shape manipulation
**Short description**: *Squeeze* removes specified dimensions (second input) equal to 1 of the first input tensor. If the second input is omitted then all dimensions equal to 1 are removed. If the specified dimension is not equal to one then error is raised.
**Short description**: *Squeeze* removes dimensions equal to 1 from the first input tensor.
**Detailed description**: *Squeeze* can be used with or without the second input tensor.
* If only the first input is provided, every dimension that is equal to 1 will be removed from it.
* With the second input provided, each value is an index of a dimension from the first tensor that is to be removed. Specified dimension has to be equal to 1, otherwise an error will be raised. Dimension indices can be specified directly, or by negative indices (counting dimensions from the end).
**Attributes**: *Squeeze* operation doesn't have attributes.
**Inputs**:
* **1**: Multidimensional input tensor of type *T*. *Required*.
* **1**: Multidimensional input tensor of type *T*. **Required**.
* **2**: 0D or 1D tensor of type *T_SHAPE* with dimensions indices to squeeze. Values could be negative. *Optional*.
* **2**: Scalar or 1D tensor of type *T_INT* with indices of dimensions to squeeze. Values could be negative (have to be from range `[-R, R-1]`, where `R` is the rank of the first input). **Optional**.
**Outputs**:
@ -20,13 +24,13 @@
**Types**
* *T*: supported type.
* *T*: any numeric type.
* *T_SHAPE*: supported integer type.
* *T_INT*: any supported integer type.
**Example**
*Example 1:*
*Example 1: squeeze 4D tensor to a 2D tensor*
```xml
<layer ... type="Squeeze">
<input>