Solved by ptrblck in post #2 
              
              
                If you just skip the dim argument, you’ll get the max value: 
a = values.max()

# if you need the index also
b = torch.argmax(values)
idx = np.unravel_index(b, values.shape)