Error using nnet.inter​nal.cnngpu​.convolveB​iasReluFor​ward2D

15 vues (au cours des 30 derniers jours)
Jingyang Zhao
Jingyang Zhao le 26 Juil 2019
Commenté : Jingyang Zhao le 5 Août 2019
I am doing image segmentation with function semanticseg and trained network.
Everything goes well until the last update of my computer. It was conducted by the university and I don't know what were changed. The change I can see is that I used to train the network on single CPU,now I can train it on single GPU and for my network, the training speed is about the same.
However, I used to use the network trained with function semanticseg and the image is 4000*6000. Now the big image cannot be processed while a smaller one still can be. And the error is shown.
The code is like this, the training of the net goes well without problem.
testImage = imread('QRed00065.JPG');
Img=testImage;
imshow(Img)
% Segment the test image and display the results.
C = semanticseg(Img,net);
B = labeloverlay(Img,C);
imshow(B)
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)'.
Z = nnet.internal.cnngpu.convolveBiasReluForward2D( ...
Z = this.ExecutionStrategy.forward( X, ...
outputActivations = thisLayer.predict(XForThisLayer);
YBatch = predictNetwork.activations({X}, layerIndex, layerOutputIndex);
Y = this.calculateActivations(X, layerID, 1, varargin{:});
Y = this.UnderlyingDAGNetwork.activationsSeries(X, layerID, varargin{:});
allScores = activations(net, X, params.PixelLayerID, ...
[Lroi, scores, allScores] = iClassifyImagePixels(Iroi, net, params);

Réponse acceptée

Srivardhan Gadila
Srivardhan Gadila le 30 Juil 2019
  1 commentaire
Jingyang Zhao
Jingyang Zhao le 5 Août 2019
yeah,its the memory problem.
I set to 'cpu' and it works again.

Connectez-vous pour commenter.

Plus de réponses (1)

Joss Knight
Joss Knight le 3 Août 2019
If you want to go back to using your CPU, add the 'ExecutionEnvironment' 'cpu' to your call to semanticseg.
C = semanticseg(Img,net,'ExecutionEnvironment','cpu');
  1 commentaire
Jingyang Zhao
Jingyang Zhao le 5 Août 2019
Thank you for that.
I wonder how to find out the biggest size of image that my GPU can process with.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Deep Learning Toolbox dans Help Center et File Exchange

Produits


Version

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by