increase number of hidden layers
6 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (1)
Srivardhan Gadila
el 3 de Mayo de 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 comentarios
Ver también
Categorías
Más información sobre Image Data Workflows en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!