Let’s say,
I have a tensor A = [1.3, 0.0, 0.6, 0.7, 0.8]
I want to find the sum of the tensor like [1.3, 0.0, 2.1]
and then choose the maximum which is 2.1
. I want to see the indices as well which were used to sum these values. In this case it will be 2, 3, 4