Why Training Set accuracy decrease dramatically after stopping the trainNetwork?
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
After stopping manually trainNetworktrainNetwork, the validation error dropped dramatically:
I tested the Training Set accuracy, and got also about 60%:
predY = classify(net,xTrain);
Any ideas what I'am doing wrong?
4 Kommentare
Don Mathis
am 23 Jan. 2019
What is your network architecture? Does it contain dropoutLayers and later BatchNormlization layers?
Antworten (1)
Don Mathis
am 8 Feb. 2019
Maybe your minibatch size is too small. The accuracy drop may be due to batchnormalization layers getting finalized, during which time the mean and variance of the incoming activations of each batchnorm layer are computed using the whole training set. If those full-batch statistics don't match the minibatch statistics very well, the finalized batchnorm layers will not be performing a very good normalization.
3 Kommentare
Don Mathis
am 11 Feb. 2019
You could try increasing the batch size iteratively to see whether that fixes the problem. I would try exponentially increasing: 1000, 2000, 4000, 8000, etc. Or you can just try the largest amount that will fit in your GPU memory right away.
Don Mathis
am 11 Feb. 2019
Also: Why does your plot show "Iterations per epoch: 1"? Were you using miniBatchSize=30000 in that run?
What are you passing to trainingOptions()?
Siehe auch
Kategorien
Mehr zu Image Data Workflows finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!