Out of memory error

4 ビュー (過去 30 日間)
Sania Gul
Sania Gul 2019 年 12 月 31 日
コメント済み: Joss Knight 2022 年 6 月 12 日
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 件のコメント
Anay Naik
Anay Naik 2022 年 6 月 8 日
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 2022 年 6 月 12 日
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?

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

回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by