Not directly, since you won’t be able to calculate gradients for these indices (unless you can come up with a valid backward method to do so and would implement it manually). Autograd will properly backpropagate to the max. values, but not the indices.