Solved by hofingermarkus in post #2 
              
              
                Found a solution myself: 
There is as library called pytorch_scatter that provides many different scatter operations (add, div, max, mean, min, mul, std). The scatter_max returns values and indices which allows to also directly use it for argmax operations. The operations also come with the accordin…