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일

0 개 추천

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

Jordan Houri
Jordan Houri 2018년 8월 31일
Hi Vishal,
Yes, I did set the MiniBatchSize to 1, and it still had the error.
I actually have access to a GPU now, and I can train the network now on the GPU.
Thanks for your answer.
sai krishna tirumala
sai krishna tirumala 2018년 10월 16일
편집: sai krishna tirumala 2018년 10월 16일
Hello Jordan,
I have a similar issue where I'm training my own data set, but I'm following the steps given in the documentation for creating a simple network classification from createSimpleDeepLearningNetworkForClassification and when I call the function trainNetwork I run into the same error. Please provide any solution if I can work without a GPU.
Salma Hassan
Salma Hassan 2019년 1월 9일
when i used the options like the above for training my own data images i got higy error and low accuracy any advice which parameters i should change it
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개)

카테고리

도움말 센터File Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기

질문:

2018년 8월 23일

편집:

2019년 11월 26일

Community Treasure Hunt

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

Start Hunting!

Translated by