gpu limit on 3070 with a simple CNN
Afficher commentaires plus anciens
hello,
I have had this problem for the past two days and I have ran out of options how to solve this. I am training a basic CNN with the input and output mentioned in the code down below. However I use my data, wheter I split it up or use smaller samples, I always get the error " Out of memory on device. To view more detail about available memory on the GPU, use 'gpuDevice()'. If the problem persists, reset the GPU by calling 'gpuDevice(1)'." I also changed my minisizebatch to one, which doesn´t help neither. The last thing I tried is to run it on my CPU where it stops after the 3rd epoch out of three. Any Ideas?
imageInputsize = [6570 7000 1];
layers = [
imageInputLayer(imageInputsize )
convolution2dLayer(3,16, 'Padding', 'same' )
batchNormalizationLayer
reluLayer
convolution2dLayer(3,10, 'Padding', 'same' )
batchNormalizationLayer
reluLayer
resize3dLayer('OutputSize',[10 70000 5], 'Name', 'resize10x10x5')
regressionLayer
];
options = trainingOptions('sgdm', ...
'InitialLearnRate', 0.01, ...
'ExecutionEnvironment', 'gpu',...
'MaxEpochs', 10,...
'MiniBatchSize', 1, ...
'Shuffle', 'every-epoch',...
'Verbose', false, ...
'Plots', 'training-progress');
net = trainNetwork(arr_B,arr_V,layers, options);
note: the input as well the outputs are double arrays.
thank you so much
5 commentaires
Walter Roberson
le 5 Jan 2022
'resize10x10x5'
Your columns and panes do get scaled up by factors of 10 and 5... but your rows goes from 6570 to 10 total, which is downsizing by a factor of 657. That makes the name of the layer confusing to humans
Kuno Bruswachtl
le 5 Jan 2022
Walter Roberson
le 5 Jan 2022
As an experiment, try resize3dLayer('OutputSize',[10 7000 5]) and even resize3dLayer('OutputSize',[10 10 5])
You did not use 'Scale' so I would not expect that you are scaling up by a factor of 70000, but it would still be a good idea to test that out, to see if the resize is leading to problems.
Kuno Bruswachtl
le 5 Jan 2022
Kuno Bruswachtl
le 5 Jan 2022
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Parallel and Cloud dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!