increase number of hidden layers
6 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposte (1)
Srivardhan Gadila
il 3 Mag 2020
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 Commenti
Vedere anche
Categorie
Scopri di più su Image Data Workflows in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!