MATLAB Answers

Out of memory error

9 ビュー (過去 30 日間)
Sania Gul
Sania Gul 2019 年 12 月 31 日
コメント済み: Sania Gul 2020 年 1 月 1 日
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);

  2 件のコメント

Joss Knight
Joss Knight 2019 年 12 月 31 日
Have you tried reducing the memory pressure? The normal way to do this in the semanticseg function would be to reduce the MiniBatchSize option.
Sania Gul
Sania Gul 2020 年 1 月 1 日
Thanks for your help ! It worked

サインインしてコメントする。

回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by