From 211ea3c63c31ec1cca95c21251697ca998b6533e Mon Sep 17 00:00:00 2001 From: Gabriele Galiero Casay Date: Fri, 20 Aug 2021 10:58:16 +0200 Subject: [PATCH] ReverseSequence specification refactored (#7112) * ReverseSequence specification refactored * Change attribute description to avoid confusion * Allow seq_lenghts input to be of floating-point precision --- docs/ops/movement/ReverseSequence_1.md | 42 ++++++++++++++++---------- 1 file changed, 26 insertions(+), 16 deletions(-) diff --git a/docs/ops/movement/ReverseSequence_1.md b/docs/ops/movement/ReverseSequence_1.md index e5f2c3ff6324ed..63c4fa10e5c875 100644 --- a/docs/ops/movement/ReverseSequence_1.md +++ b/docs/ops/movement/ReverseSequence_1.md @@ -2,35 +2,45 @@ **Versioned name**: *ReverseSequence-1* -**Category**: data movement operation +**Category**: *Data movement* **Short description**: *ReverseSequence* reverses variable length slices of data. -**Detailed description**: *ReverseSequence* slices input along the dimension specified in the *batch_axis*, and for each slice *i*, reverses the first *lengths[i]* (the second input) elements along the dimension specified in the *seq_axis*. +**Detailed description** + +*ReverseSequence* slices a given input tensor `data` along the dimension specified in the *batch_axis* attribute. For each slice `i`, it reverses the first `seq_lengths[i]` elements along the dimension specified in the *seq_axis* attribute. **Attributes** * *batch_axis* - * **Description**: *batch_axis* is the index of the batch dimension. - * **Range of values**: an integer. Can be negative. + * **Description**: *batch_axis* is the index of the batch dimension along which `data` input tensor is sliced. + * **Range of values**: an integer within the range `[-rank(data), rank(data) - 1]` * **Type**: `int` - * **Default value**: 0 + * **Default value**: `0` * **Required**: *no* * *seq_axis* - * **Description**: *seq_axis* is the index of the sequence dimension. - * **Range of values**: an integer. Can be negative. + * **Description**: *seq_axis* is the index of the sequence dimension along which elements of `data` input tensor are reversed. + * **Range of values**: an integer within the range `[-rank(data), rank(data) - 1]` * **Type**: `int` - * **Default value**: 1 + * **Default value**: `1` * **Required**: *no* -**Inputs**: +**Inputs** + +* **1**: `data` - Input data to reverse. A tensor of type *T1* and rank greater or equal to 2. **Required.** +* **2**: `seq_lengths` - Sequence lengths to reverse in the input tensor `data`. A 1D tensor comprising `data_shape[batch_axis]` elements of type *T2*. All element values must be integer values within the range `[1, data_shape[seq_axis]]`. Value `1` means, no elements are reversed. **Required.** + +**Outputs** -* **1**: tensor with input data to reverse. **Required.** +* **1**: The result of slice and reverse `data` input tensor. A tensor of type *T1* and the same shape as `data` input tensor. -* **2**: 1D tensor populated with integers with sequence lengths in the 1st input tensor. **Required.** +**Types** + +* *T1*: any supported type. +* *T2*: any supported numerical type. **Example** @@ -38,19 +48,19 @@ - - 3 - 10 + + 4 + 10 100 200 - 3 + 4 - 3 + 4 10 100 200