Getting largest values in a tensor

I’d probably go for your topk call on a flattened tensor and unreaveling the indices as described here:

Best regards

Thomas

2 Likes