From 311416ac024ff419591cab8adf62e1f08c47dd0b Mon Sep 17 00:00:00 2001 From: Katarzyna Mitrus Date: Thu, 22 Apr 2021 14:31:06 +0200 Subject: [PATCH] [Spec] Transpose op spec update (#5215) * Update detailed description * Update input info * Output description update * Update math formula * Change T1, T2 to T and T_AXIS * Update input description * Update output description * Update examples * Simplify output description * Add missed comma --- docs/ops/movement/Transpose_1.md | 47 ++++++++------------------------ 1 file changed, 11 insertions(+), 36 deletions(-) diff --git a/docs/ops/movement/Transpose_1.md b/docs/ops/movement/Transpose_1.md index 877f6018151..604dc3258d3 100644 --- a/docs/ops/movement/Transpose_1.md +++ b/docs/ops/movement/Transpose_1.md @@ -6,30 +6,26 @@ **Short description**: *Transpose* operation reorders the input tensor dimensions. -**Attributes**: +**Detailed description**: *Transpose* operation reorders the input tensor dimensions. Source indexes and destination indexes are bound by the formula: +\f[output[i(order[0]), i(order[1]), ..., i(order[N-1])] = input[i(0), i(1), ..., i(N-1)]\\ \quad \textrm{where} \quad i(j) \quad\textrm{is in the range} \quad [0, (input.shape[j]-1)]\f] -No attributes available. + +**Attributes**: *Transpose* operation has no attributes. **Inputs**: -* **1**: "arg" - the tensor to be transposed. A tensor of type T1. **Required.** -* **2**: "input_order" - the permutation to apply to the axes of the input shape. Must be a vector of element T2 type, with shape [n], where n is the rank of "arg". The tensor's value must contain every integer in the range [0,n-1]. If an empty list is specified [] then the axes will be inverted. A tensor of type T2. **Required.** +* **1**: `arg` - the tensor to be transposed. A tensor of type `T` and arbitrary shape. **Required.** +* **2**: `input_order` - the permutation to apply to the axes of the first input shape. A 1D tensor of `n` elements `T_AXIS` type and shape `[n]`, where `n` is the rank of the first input or `0`. The tensor's value must contain every integer in the range `[0, n-1]`, but if an empty tensor is specified (shape `[0]`), then the axes will be inverted. **Required.** **Outputs**: -* **1**: A tensor with shape and type matching 1st tensor. +* **1**: A tensor of type `T` and transposed shape according to the rules specified above. **Types** -* *T1*: arbitrary supported type. -* *T2*: any integer type. +* *T*: any supported type. +* *T_AXIS*: any integer type. -**Detailed description**: - -*Transpose* operation reorders the input tensor dimensions. Source indexes and destination indexes are bound by the formula: -\f[ - output[i(order[0]), i(order[1]), ..., i(order[N-1])] = input[i(0), i(1), ..., i(N-1)], where i(j) in range 0..(input.shape[j]-1). -\f] **Examples** @@ -57,28 +53,7 @@ No attributes available. ``` -*Example 2: input_order in not specified* - -```xml - - - - 2 - 3 - 4 - - - - - 4 - 3 - 2 - - - -``` - -*Example 3: input_order = empty_list []* +*Example 2: input_order = empty 1D tensor of Shape[0] ```xml @@ -89,7 +64,7 @@ No attributes available. 4 - 0 + 0