increase number of hidden layers
조회 수: 5 (최근 30일)
이전 댓글 표시
This is my matlab code
layers = [
imageInputLayer([256 256 3])
convolution2dLayer(4,13,'Padding','same')
batchNormalizationLayer
reluLayer
maxPooling2dLayer(11,'Stride',11)
convolution2dLayer(7,28,'Padding','same')
batchNormalizationLayer
reluLayer
maxPooling2dLayer(11,'Stride',11)
convolution2dLayer(5,34,'Padding','same')
batchNormalizationLayer
reluLayer
fullyConnectedLayer(38)
softmaxLayer
classificationLayer];
options = trainingOptions('sgdm', ...
'InitialLearnRate',0.06, ...
'MaxEpochs',10, ...
'Shuffle','every-epoch', ...
'ValidationData',imdsValidation, ...
'ValidationFrequency',30, ...
'Verbose',false, ...
'Plots','training-progress');
net = trainNetwork(imdsTrain,layers,options);
YPred = classify(net,imdsValidation);
YValidation = imdsValidation.Labels;
accuracy = sum(YPred == YValidation)/numel(YValidation)
I want to increase the no of hidden layers. please somebody help.
댓글 수: 0
답변 (1개)
Srivardhan Gadila
2020년 5월 3일
You can refer to List of Deep Learning Layers and add layers like convolution2dLayer, fullyConnectedLayer to your above layer array.
You can also refer to the following resources Deep Learning Tips and Tricks, Specify Layers of Convolutional Neural Network & Create Simple Deep Learning Network for Classification
layers = [
imageInputLayer([256 256 3])
convolution2dLayer(4,13,'Padding','same')
batchNormalizationLayer
reluLayer
maxPooling2dLayer(11,'Stride',11)
convolution2dLayer(7,28,'Padding','same')
batchNormalizationLayer
reluLayer
maxPooling2dLayer(11,'Stride',11)
convolution2dLayer(5,34,'Padding','same')
batchNormalizationLayer
reluLayer
fullyConnectedLayer(38)
softmaxLayer
classificationLayer];
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Image Data Workflows에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!