Skip to content

Commit

Permalink
Add perm length constraint in Transpose doc (#5857)
Browse files Browse the repository at this point in the history
fix #5481

Signed-off-by: isdanni <leedanni@gmail.com>
  • Loading branch information
isdanni committed Jan 16, 2024
1 parent 175fd52 commit 54e704e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/Changelog.md
Expand Up @@ -25724,7 +25724,7 @@ This version of the operator has been available since version 21 of the default

<dl>
<dt><tt>perm</tt> : list of ints</dt>
<dd>A list of integers. By default, reverse the dimensions, otherwise permute the axes according to the values given.</dd>
<dd>A list of integers. By default, reverse the dimensions, otherwise permute the axes according to the values given. Its length must be equal to the rank of the input.</dd>
</dl>

#### Inputs
Expand Down
2 changes: 1 addition & 1 deletion docs/Operators.md
Expand Up @@ -33454,7 +33454,7 @@ Other versions of this operator: <a href="Changelog.md#Transpose-1">1</a>, <a hr

<dl>
<dt><tt>perm</tt> : list of ints</dt>
<dd>A list of integers. By default, reverse the dimensions, otherwise permute the axes according to the values given.</dd>
<dd>A list of integers. By default, reverse the dimensions, otherwise permute the axes according to the values given. Its length must be equal to the rank of the input.</dd>
</dl>

#### Inputs
Expand Down
3 changes: 2 additions & 1 deletion onnx/defs/tensor/defs.cc
Expand Up @@ -1087,7 +1087,8 @@ ONNX_OPERATOR_SET_SCHEMA(
.Attr(
"perm",
"A list of integers. By default, reverse the dimensions, "
"otherwise permute the axes according to the values given.",
"otherwise permute the axes according to the values given. "
"Its length must be equal to the rank of the input.",
AttributeProto::INTS,
OPTIONAL_VALUE)
.Input(0, "data", "An input tensor.", "T", OpSchema::Single, true, 1, OpSchema::Differentiable)
Expand Down

0 comments on commit 54e704e

Please sign in to comment.