Note that in that case, we should follow the same convention as argmax.

```
In case of multiple occurrences of the maximum values, the indices corresponding to the first occurrence are returned.
```