Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Creating CNN architecture for binary classification

조회 수: 5 (최근 30일)
Reem
Reem 2025년 7월 28일
마감: John D'Errico 2025년 7월 29일
I’m reaching out to kindly ask if somone could review the CNN architecture I’ve implemented in MATLAB. The code is running as expected, but I’d appreciate your expert opinion to confirm whether the structure is sound and appropriate for the task.
Below is a snippet of the architecture and training configuration:
matlab
CopyEdit
%% === CNN Architecture ===
layers = [
sequenceInputLayer(1, 'Name', 'input', 'MinLength', minTrainLen)
convolution1dLayer(5, 32, 'Padding', 'same', 'Name', 'conv1')
batchNormalizationLayer('Name', 'bn1')
reluLayer('Name', 'relu1')
maxPooling1dLayer(2, 'Stride', 2, 'Name', 'pool1')
convolution1dLayer(3, 64, 'Padding', 'same', 'Name', 'conv2')
batchNormalizationLayer('Name', 'bn2')
reluLayer('Name', 'relu2')
dropoutLayer(0.3, 'Name', 'dropout1')
globalAveragePooling1dLayer('Name', 'gap')
fullyConnectedLayer(32, 'Name', 'fc1')
reluLayer('Name', 'relu3')
fullyConnectedLayer(2, 'Name', 'fc_output')
softmaxLayer('Name', 'softmax')
classificationLayer('Name', 'output')
];
%% === Training Options ===
options = trainingOptions('adam', ...
'InitialLearnRate', 1e-3, ...
'MaxEpochs', 30, ...
'MiniBatchSize', max(1, min(64, numel(XTrainFinal))), ...
'Shuffle', 'every-epoch', ...
'ValidationData', {XVal, YVal}, ...
'ValidationFrequency', 5, ...
'ValidationPatience', 2, ...
'Verbose', false, ...
'Plots', 'none', ...
'ExecutionEnvironment', 'auto');
  댓글 수: 1
Matt J
Matt J 2025년 7월 28일
편집: Matt J 2025년 7월 28일
I believe you already asked that here,
The statement of the question hasn't changed much, so I don't think you will get very different answers.

답변 (0개)

이 질문은 마감되었습니다.

태그

제품


릴리스

R2023b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by