Is my CNN Correct
4 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Is my CNN Correct ( It works in my data but I need to confirm it with expert review)
% CNN Definition
layers = [
sequenceInputLayer(1)
convolution1dLayer(5,16,'Padding','same')
batchNormalizationLayer
reluLayer
convolution1dLayer(3,32,'Padding','same')
batchNormalizationLayer
reluLayer
globalAveragePooling1dLayer
fullyConnectedLayer(16)
reluLayer
fullyConnectedLayer(2)
softmaxLayer
classificationLayer
];
options = trainingOptions('adam', ...
'InitialLearnRate',0.001, ...
'MaxEpochs',30, ...
'MiniBatchSize',128, ...
'Shuffle','every-epoch', ...
'Verbose',false, ...
'ExecutionEnvironment','auto', ...
'Plots','none');
net = trainNetwork(XTrain, categorical(YTrain), layers, options);
0 Commenti
Risposte (2)
Chuguang Pan
il 26 Lug 2025
layers = [
sequenceInputLayer(1)
convolution1dLayer(5,16,'Padding','same')
batchNormalizationLayer
reluLayer
convolution1dLayer(3,32,'Padding','same')
batchNormalizationLayer
reluLayer
globalAveragePooling1dLayer
fullyConnectedLayer(16)
reluLayer
fullyConnectedLayer(2)
softmaxLayer
]; % classificationLayer is not recommended
cnnNet = dlnetwork(layers);
input = dlarray(rand(1,20,1024),"CBT");
% analyzeNetwork(cnnNet,input) % analyzeNetwork is not supported in online
0 Commenti
Walter Roberson
il 26 Lug 2025
There are definitely more than 10 possible layers at any point.
Your system has 12 layers.
Therefore there are over 10^12 possible combinations for 12 layers.
We have no possible way of knowing whether your one network is "the" correct network out of 10^12 possibilities.
The most we could talk about is whether it is a plausible arrangement of layers for some purpose. There is absolutely no way for us to know that it is the one true network... since you did not even describe your needs.
0 Commenti
Vedere anche
Categorie
Scopri di più su Deep Learning Toolbox 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!