serhii
(Serhii H)
1
Hello everyone.
Does anyone know how to make tril work on tensor without using a loop as suggested here? I would appreciate any help.
SimonW
(Simon Wang)
2
Do you mean batched tril?
tom
(Thomas V)
3
I used numpy’s triu_indices to set things to 0 above the diagonal (see below). An alternative can be you could also use a mask.
Best regards
Thomas
2 Likes
serhii
(Serhii H)
4
Yes, that is what I meant.
serhii
(Serhii H)
5
Nice, this is a good workaround. Thank you a lot, Thomas!