Skip to main content

ClikaRT::ops::tril

function

tril()

Tensor tril(Tensor x, int64_t diagonal = 0)

Zero out the entries ABOVE the chosen diagonal of the last two axes; the lower-triangular part survives. diagonal: 0 = main, +k above, -k below. Copies.

Throws

  • ClikaRT::Error: (INVALID_ARGUMENT) when the input's rank is < 2 (code_name() carries the reason).

Returns: a new tensor, x's shape and dtype.

Declared in ClikaRT/compute/ops.h, line 3433