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.
5876
+
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.
5901
+
- *input*: an {{MLOperand}}. The input tensor which is at least 2-D.
5902
5902
- *options*: an optional {{MLTriangularOptions}}. The optional parameters of the operation.
5903
5903
5904
-
**Returns:** an {{MLOperand}}. The output 2-D tensor representing a triangular matrix.
5904
+
**Returns:** an {{MLOperand}}. The output tensor representing a triangular matrix, or batch of matrices which is the same shape as the input.
5905
5905
</div>
5906
5906
5907
5907
<details open algorithm>
5908
5908
<summary>
5909
5909
The <dfn method for=MLGraphBuilder>triangular(|input|, |options|)</dfn> method steps are:
5910
5910
</summary>
5911
5911
<div class=algorithm-steps>
5912
+
1. If the [=list/size=] of |input|.{{MLOperand/[[descriptor]]}}.{{MLOperandDescriptor/dimensions}} is less than 2, then [=exception/throw=] a "{{DataError}}" {{DOMException}}.
5912
5913
1. If any of the following sub-steps fail, [=exception/throw=] an "{{OperationError}}" {{DOMException}}.
5913
5914
1. Let |output| be the result of [=copying an MLOperand=] given |input|.
0 commit comments