Hi guys, does PyTorch has the function that would return me the vectorized upper triangular matrix?
For example, I have Tensors as [ [1, 2, 3], [4, 5, 6], [7, 8, 9]], and I want [1, 2, 3, 5, 6, 9]. I know numpy has triu_indices, which will return me the indices of upper triangular matrix, and use the index I can easily get the elements I want from numpy matrix. but it seems that I can’t do that in PyTorch.
Thanks!