Out of memory error
3 次查看(过去 30 天)
显示 更早的评论
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
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
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 个)
另请参阅
类别
在 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!