I have a problem about " out of memory" for running VGG16 for image classification
5 次查看(过去 30 天)
显示 更早的评论
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'
Index: 1
ComputeCapability: '7.5'
SupportsDouble: 1
DriverVersion: 11.1000
ToolkitVersion: 11
MaxThreadsPerBlock: 1024
MaxShmemPerBlock: 49152
MaxThreadBlockSize: [1024 1024 64]
MaxGridSize: [2.1475e+09 65535 65535]
SIMDWidth: 32
TotalMemory: 4.2950e+09
AvailableMemory: 3.3381e+09
MultiprocessorCount: 14
ClockRateKHz: 1710000
ComputeMode: 'Default'
GPUOverlapsTransfers: 1
KernelExecutionTimeout: 1
CanMapHostMemory: 1
DeviceSupported: 1
DeviceAvailable: 1
DeviceSelected: 1
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.
0 个评论
回答(1 个)
Joss Knight
2021-9-16
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
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Image Data Workflows 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!