Invalid training data: The output size of the last layer does not match the response size
Show older comments
layers = [
imageInputLayer([256 256 1],"Name","imageinput")
convolution2dLayer([7 7],3,'Stride',1,"Name","conv1","Padding","same")
reluLayer("Name","relu1")
%batchNormalizationLayer("Name","batchnorm")
maxPooling2dLayer(2,'Name','maxPooling1', 'stride', 1)
convolution2dLayer([5 5],3,'Stride',1,"Name","conv2","Padding","same")
reluLayer("Name","relu2")
maxPooling2dLayer(2,'Name','maxPooling2', 'stride', 1)
convolution2dLayer([3 3],2,'Stride',1,"Name","conv3","Padding","same")
reluLayer("Name","relu3")
maxPooling2dLayer(2,'Name','maxPooling3', 'stride', 1)
softmaxLayer("Name","softmax")
pixelClassificationLayer("Name","pixel-class", )
];
Error using trainNetwork (line 165)
Invalid training data. The output size ([253 253 2]) of the last layer does not match the response size ([256 256 2]).
Accepted Answer
More Answers (0)
Categories
Find more on Deep Learning Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!