Layer 4 is expected to have a different size(Convolutional Neural Network)?
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Esra Kaya
el 3 de Abr. de 2017
Respondida: Huma Chaudhry
el 25 de Jun. de 2020
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;
0 comentarios
Respuesta aceptada
Huma Chaudhry
el 25 de Jun. de 2020
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.
0 comentarios
Más respuestas (1)
Ver también
Categorías
Más información sobre Pattern Recognition and Classification en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!