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