You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given a 2-D tensor (matrix), return a 2-D tensor containing either the upper or lower triangular part of the input tensor.
5732
+
Given a 2-D tensor (matrix), return a 2-D tensor containing either the upper or lower triangular part of the input tensor. If the input tensor has greater than 2 dimensions it is treated as a batch of matrices and the result has the same shape.
- *input*: an {{MLOperand}}. The input 2-D tensor.
5757
+
- *input*: an {{MLOperand}}. The input tensor which is at least 2-D.
5758
5758
- *options*: an optional {{MLTriangularOptions}}. The optional parameters of the operation.
5759
5759
5760
-
**Returns:** an {{MLOperand}}. The output 2-D tensor representing a triangular matrix.
5760
+
**Returns:** an {{MLOperand}}. The output tensor representing a triangular matrix, or batch of matrices which is the same shape as the input.
5761
5761
</div>
5762
5762
5763
5763
<details open algorithm>
5764
5764
<summary>
5765
5765
The <dfn method for=MLGraphBuilder>triangular(|input|, |options|)</dfn> method steps are:
5766
5766
</summary>
5767
5767
<div class=algorithm-steps>
5768
+
1. If the [=list/size=] of |input|.{{MLOperand/[[descriptor]]}}.{{MLOperandDescriptor/dimensions}} is less than 2, then [=exception/throw=] a "{{DataError}}" {{DOMException}}.
5768
5769
1. If any of the following sub-steps fail, [=exception/throw=] an "{{OperationError}}" {{DOMException}}.
5769
5770
1. Let |output| be the result of [=copying an MLOperand=] given |input|.
0 commit comments