Is my CNN Correct
6 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (2 件)
Chuguang Pan
2025 年 7 月 26 日
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 件のコメント
Walter Roberson
2025 年 7 月 26 日
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 件のコメント
参考
カテゴリ
Help Center および File Exchange で Deep Learning Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!