I have a problem about " out of memory" for running VGG16 for image classification
15 views (last 30 days)
Hello Andrea and ioannisbaptista.
I have a problem when I am training the program for image classification. The error message is "out of memory". My GPU specification bellow.
Name: 'GeForce GTX 1650'
MaxThreadBlockSize: [1024 1024 64]
MaxGridSize: [2.1475e+09 65535 65535]
I try to training for alexnet, it's not problem. When I training for VGG16, the problem occured as "out of memory".
This part is where the error occurs. I am set teh minibatch size=5. epoch =10. Amount of pictures are 300 only.
featuresTrain = activations(netTransfer,augimdsTrain,layer,'OutputAs','rows');
I need your help.
I still have to train also the Resnet 110 and iceptionV3 architecture. I need the help of both of you. God bless all fo you.
Joss Knight on 16 Sep 2021
It doesn't look as though you're setting the MiniBatchSize on the call to activations which means it's using the default value of 128 - no doubt this is too high for your GPU. Make sure you set this property: https://uk.mathworks.com/help/deeplearning/ref/seriesnetwork.activations.html#mw_366511e3-c444-4c5d-baad-e7c016a559fd