How to compute accuracy for CNN when outputs are one-hot encoded I want to compute accuracy of my model on test data. I have three classes so actual output might look like this :

[0 1 0]


and the predicted output might look like this:

[0.1 0.8 0.1]


How do I compute accuracy with this?
Shall I compute cross entropy and subtract 1 from that?
Predicted class is the one with highest probability in output vector (class B in your case) &amp; accuracy is correct predictions %, unless I'm missing your point.

The problem that you have mentioned is representative of multi-class classification which is solved using Softmax output layer in neutral net. NOTE that Softmax uses Cross Entropy as loss function.

I feel that calculating Cross Entropy on output may not make sense.