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.
5915
+
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.
5940
+
- *input*: an {{MLOperand}}. The input tensor which is at least 2-D.
5941
5941
- *options*: an optional {{MLTriangularOptions}}. The optional parameters of the operation.
5942
5942
5943
-
**Returns:** an {{MLOperand}}. The output 2-D tensor representing a triangular matrix.
5943
+
**Returns:** an {{MLOperand}}. The output tensor representing a triangular matrix, or batch of matrices which is the same shape as the input.
5944
5944
</div>
5945
5945
5946
5946
<details open algorithm>
5947
5947
<summary>
5948
5948
The <dfn method for=MLGraphBuilder>triangular(|input|, |options|)</dfn> method steps are:
5949
5949
</summary>
5950
5950
<div class=algorithm-steps>
5951
+
1. If the [=list/size=] of |input|.{{MLOperand/[[descriptor]]}}.{{MLOperandDescriptor/dimensions}} is less than 2, then [=exception/throw=] a "{{DataError}}" {{DOMException}}.
5951
5952
1. If any of the following sub-steps fail, [=exception/throw=] an "{{OperationError}}" {{DOMException}}.
5952
5953
1. Let |output| be the result of [=copying an MLOperand=] given |input|.
0 commit comments