2
$\begingroup$

So I am computing the training accuracy of my CNN on a batch training data and it almost always gives 100% accuracy. But I found from somewhere that in order to get the training accuracy, it is tested against the entire training data and not the specific batch that you used for your training.

Is training accuracy even computed? I wonder if you don't use batches for training. Then it will be 100% accuracy always? enter image description here

I'm suspecting that this is due to using a small batch size.

$\endgroup$
2
  • $\begingroup$ Accuracy can be too noisy to be evaluated on minibatches, although it is not always as bad as this. Look at the validation accuracy and training proxy loss (e.g., cross entropy). $\endgroup$
    – Emre
    Jun 10 '17 at 17:42
  • $\begingroup$ I just realized that I was using minibatch size 10 $\endgroup$
    – Chaine
    Jun 10 '17 at 17:46
1
$\begingroup$

Training accuracy is not considered because it can give falsified evaluation value for over-fitting 100% in your case. Hence it is always computed against the batch not entertained for training. This corresponds to the generalized error. For more information see K-Fold cross validation.

This might help: https://thebayesianobserver.files.wordpress.com/2012/02/debugging-ml.png

$\endgroup$
4
  • $\begingroup$ What I did was to train on a batch, then compute the accuracy on a validation set. But is k-fold validation better? And the accuracy from k-fold cross validation is called training accuracy or validation accuracy? $\endgroup$
    – Chaine
    Jun 10 '17 at 15:06
  • $\begingroup$ And the odd thing about it is that the batch accuracy goes to 0% real quick and other mulipltes of 10% instead of steadily increaing. $\endgroup$
    – Chaine
    Jun 10 '17 at 15:10
  • $\begingroup$ Hi I added a screenshot of the results I got. $\endgroup$
    – Chaine
    Jun 10 '17 at 15:25
  • $\begingroup$ The accuracy you get from k-fold cross validation is called the validation accuracy? $\endgroup$
    – Chaine
    Jun 10 '17 at 15:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.