MATLAB Answers

Getting error when using semanticseg function

7 views (last 30 days)
Manusree Bhatter
Manusree Bhatter on 28 Jul 2020
I am trying to use the semanticseg function to segment an image of dimensions 256x232x192 with a trained DAGnetwork. However I keep getting an error saying this:
"Error using gpuArray/cat. Maximum variable size allowed on the device is exceeded.
Error in nnet.internal.cnn.layer.Concatenation/predict (line 54)
Z = cat(this.ConcatenationAxis, X{:});
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 (line 248)
[Lroi, scores, allScores] = iClassifyImagePixels(Iroi, net, params);"
My gpu has 24 GB of RAM, so it seems extremely unlikely that I am running out of memory running this, considering that the image gpuarray I am inputting is much less than 24 GB. I am able to input patches of [64 64 64] and [128 128 128] of the image succesfully and segment it, but I need to be able to input the whole image into the function as well. Is there a bug within the semanticseg function? How can I input the whole image into the semanticseg function? Thank you in advance!
Manusree Bhatter
Manusree Bhatter on 28 Jul 2020
The array is less than 1 megabyte, it is nowhere near the maximum memory of the GPU. Could there be an issue with the semanticseg function itself?

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!