Doubt in computing log_loss error

Hello

Can anyone tell me how below code is working for a Multiclass output DNN.

log_loss(np.argmax(Y, axis=1), Y_pred)

As Ypred contains probabilities (from softmax function), while the first argument of the above code is containing indices of max value along rows of true output. Then how log_loss is functioning? both arguments should have equitable data, isn’t it?

WHat am I missing here?

I understood it now , Thank you