tril¶
- dragon.vm.torch.- tril(
 input,
 diagonal=0,
 out=None
 )[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 = torch.ones(3, 3) print(torch.tril(x)) - Parameters:
- input (dragon.vm.torch.Tensor) – The input tensor.
- diagonal (int, optional, default=0) – Diagonal above which to zero elements.
- out (dragon.vm.torch.Tensor, optional) – The output tensor.
 
 - Returns:
- dragon.vm.torch.Tensor – The output tensor. 
 
