Method Triu
Triu<T>(T, int)
Computes the output tensor by retaining the upper triangular values from an input matrix or matrix batch and setting the other values to zero.
Declaration
public T Triu<T>(T X, int k = 0) where T : Tensor
Parameters
Type | Name | Description |
---|---|---|
T | X | The input tensor. |
int | k | The offset from the diagonal to exclude. |
Returns
Type | Description |
---|---|
T | The computed output tensor. |
Type Parameters
Name | Description |
---|---|
T | The tensor type. |