tril¶
- dragon.- tril(
 inputs,
 k=0,
 copy=True,
 **kwargs
 )[source]¶
- Return the lower triangular part of input. \[\text{out}_{ij} = \begin{cases} 0, & \text{ if } j > i + k \\ \text{input}_{ij}, & \text{ otherwise } \end{cases} \]- Examples: - x = dragon.ones((3, 3)) print(dragon.tril(x)) - Parameters:
- inputs (dragon.Tensor) – The input tensor.
- k (int, optional, default=0) – Diagonal above which to zero elements.
- copy (bool, optional, default=True) – Return a new tensor or call in-place.
 
 - Returns:
- dragon.Tensor – The output tensor. 
 
