Layer 4 is expected to have a different size(Convolutional Neural Network)?

조회 수: 2 (최근 30일)
Hi, I am working on the segmentation of retina bloodvessels with CNN. While I compose my CNN structure, I come across a problem with the size of Layer 4 which is conv2 and can not train the network. My images have 625x625X1 gray images and my network structure is below. I appreciate your help already, thanks.
if true
% code
end
inputLayer = imageInputLayer([625 625 1]);
conv1 = convolution2dLayer(25,25 , 'Stride', 25, 'Padding', 0, 'NumChannels', 1 );
relu1 = reluLayer;
conv2 = convolution2dLayer(4,22, 'Stride', 1, 'Padding', 0, 'NumChannels', 12);
relu2 = reluLayer;
norm2 = crossChannelNormalizationLayer(5);
pool2 = maxPooling2dLayer(2, 'Stride', 2, 'Padding', 1); %subsampling
conv3 = convolution2dLayer(4,8 , 'Stride', 1, 'Padding', 0, 'NumChannels', 12);
relu3 = reluLayer;
norm3 = crossChannelNormalizationLayer(5);
pool3 = maxPooling2dLayer(2, 'Stride', 2, 'Padding', 1); %subsampling
fc4 = fullyConnectedLayer(1100);
relu4 = reluLayer;
drop4 = dropoutLayer(0.5);
fc5 = fullyConnectedLayer(1);
SMAX = softmaxLayer;
ClassOut = classificationLayer;

채택된 답변

Huma Chaudhry
Huma Chaudhry 2020년 6월 25일
Most likely the issue is with the DEPTH of the block. Check the network parameters and see if the input network and output network have suitable depth.

추가 답변 (1개)

Khadija Al Jabri
Khadija Al Jabri 2017년 11월 13일
I have the same issue!

카테고리

Help CenterFile Exchange에서 Pattern Recognition and Classification에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by