Trilu
Description
Returns the upper or lower triangle part of a tensor.
Input
One inputs:
x: tensor of type float, float16, float64, or int64.
A 0-Dtensor that contains a single value corresponding to the number diagonal above or below the main diagonal. If one of the values is included, the other is excluded. If it is not specified, the default value 0 is used.
Output
One output:
y: tensor of type float16, float32, or double.
Property
upper: int. The default value is 1.
Whether to retain the upper or lower part of the matrix. The default value is true.
ONNX Opset Support
Opset v14/v15/v16/v17/v18
Parent topic: Operators Specifications of the AI Framework