Error in training SegNet on CPU

5 次查看(过去 30 天)
I am trying to train SegNet on a CPU with an Intel Core i7-4770 processor @ 3.40 GHz using the example code provided ( https://www.mathworks.com/help/vision/examples/semantic-segmentation-using-deep-learning.html ), but I am getting the following error:
Error using trainNetwork (line 154)
Too many input arguments.
Error in exampleSegnet (line 98)
[net, info] = trainNetwork(pximds,lgraph,options);
Caused by:
Error using gather
Too many input arguments.
I know the gather function collects arrays into memory, so could this error be caused by the computer running out of memory? I have about 25 free GB of memory. Additionally, the error persisted even when I reduced the proportion of training images to 10%.
Thanks

采纳的回答

Vishal Bhutani
Vishal Bhutani 2018-8-31
Based on my understanding you want to train a Semantic Segmentation using CPU with an Intel Core i7-4770 processor. I also think that it may be an issue with the memory. As you maybe aware, that it is mentioned in the documentation, model was trained using NVIDIA Titan X, which has 12GB of GPU memory. As mentioned in the documentation did you try lowering the MiniBatchSize property in training options to 1? If it still not works you may still need to reduce the training data. It might be also possible that the example require GPU for training.
options = trainingOptions('sgdm', ...
'Momentum',0.9, ...
'InitialLearnRate',1e-3, ...
'L2Regularization',0.0005, ...
'MaxEpochs',100, ...
'MiniBatchSize',4, ...
'CheckpointPath',tempdir, ...
'Shuffle','every-epoch', ...
'VerboseFrequency',2);
  5 个评论
Walter Roberson
Walter Roberson 2019-11-23
evianita dewi asks Jordan Houri:
I have the same error. How did you solve the problem ?
MShia
MShia 2019-11-26
编辑:MShia 2019-11-26
It is a bit strange but by removing the BatchNormalizationLayer, it works for me .

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 GPU Computing 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by