필터 지우기
필터 지우기

Deep learning error Lot of files open

조회 수: 1 (최근 30일)
Venkat R
Venkat R 2017년 8월 8일
댓글: Ronak Patel 2020년 5월 27일
Hi
I am training a 6 layers CNN for 3 class classification. Each image is resized to [90 70]. Total 4000 images for training. My PC is with i7, 32GB RAM. But no GPU. When I am training for more than 30 epochs, I am getting error that too many files are open. In the same session, I cannot run even one epoch. See attached snapshot. But, If I close the Matlab session and rerun, Program once again upto 30 epochs only. The RAM is also not 50% full. Why am I getting this error and how to fix it.
Thank you for help in advance.
with regards Ramana
PS: Code is as follows
%CNN for train val sets
digitDatasetPath = fullfile('E:\Database\resize\train');
trainDigitData = imageDatastore(digitDatasetPath, ...
'IncludeSubfolders',true,'LabelSource','foldernames');
img = readimage(trainDigitData,1);
digitDatasetPath = fullfile('E:\Database\resize\val');
testDigitData = imageDatastore(digitDatasetPath, ...
'IncludeSubfolders',true,'LabelSource','foldernames');
layers = [imageInputLayer([size(img,1) size(img,2) 1]);
convolution2dLayer(5,20);
reluLayer();
maxPooling2dLayer(2,'Stride',2);
fullyConnectedLayer(3);
softmaxLayer();
classificationLayer()];
options = trainingOptions('sgdm','MaxEpochs',30,'InitialLearnRate',0.0001,'ExecutionEnvironment','cpu');
rng('default')
convnet = trainNetwork(trainDigitData,layers,options);
YTest = classify(convnet,testDigitData);
TTest = testDigitData.Labels;
accuracy = sum(YTest == TTest)/numel(TTest)
disp('All over')
  댓글 수: 2
Joss Knight
Joss Knight 2017년 8월 8일
What is the actual error? What happens if you play with the 'MaxEpochs' training option, setting it to, say, 32?
Ronak Patel
Ronak Patel 2020년 5월 27일
i tried your code so i ask one question how to decided fully connected layer

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Image Data Workflows에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by