Effacer les filtres
Effacer les filtres

Out of memory error

1 vue (au cours des 30 derniers jours)
Sania Gul
Sania Gul le 31 Déc 2019
Commenté : Joss Knight le 12 Juin 2022
I am trainning Unet. I have 7500 images and their masks. The size of individual image and mask is (512,180). I have divided the data for training and testing in ratio of 0.9:0.1. My training goes fine but i get Out of memory error after it. The network then doesnot perform any testing. Kindly tell me the solution
The error is given as.
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)'.
Error in nnet.internal.cnn.layer.util.BatchNormalizationGPUStrategy/forwardPredict (line 14)
Z = nnet.internal.cnngpu.batchNormalizationForwardPredict(X, beta, gamma, epsilon, inputMean, inputVar, channelDim);
Error in nnet.internal.cnn.layer.BatchNormalization/predict (line 159)
Z = this.ExecutionStrategy.forwardPredict( ...
Error in nnet.internal.cnn.DAGNetwork/activations (line 571)
outputActivations = thisLayer.predict(XForThisLayer);
Error in DAGNetwork/calculateActivations (line 86)
YBatch = predictNetwork.activations({X}, layerIndex, layerOutputIndex);
Error in DAGNetwork/activations (line 138)
Y = this.calculateActivations(X, layerIndex, layerOutputIndex, varargin{:});
Error in semanticseg>iClassifyImagePixels (line 447)
allScores = activations(net, X, name, ...
Error in semanticseg>iProcessImageDatastoreSerially (line 663)
L = iClassifyImagePixels(X, net, params);
Error in semanticseg (line 211)
filenames = iProcessImageDatastoreSerially(imds, net, params);
Error in Step5NeuralNetwork (line 90)
pxdsResults = semanticseg(imdsTest,net,'WriteLocation',tempdir,'Verbose',false);
  4 commentaires
Anay Naik
Anay Naik le 8 Juin 2022
How do you change the miniBatchSize of a pretrained network? Is there a function? If so, how is it written and where should it be placed in the code?
Thank you!
Joss Knight
Joss Knight le 12 Juin 2022
You read the documentation and see that for a DAGNetwork, the predict, classify and activations functions have a MiniBatchSize option. Is that what you're using?

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Image Data Workflows dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by