我从https://arxiv.org/pdf/1603.01068.pdf获取了这个神经网络配置,我不明白为什么 Matlab 说第 8 层由于尺寸问题而不能接受第 7 层的数据。这些是层:
layers = [
imageInputLayer([block_dimensions block_dimensions 3]) %64x64x3
convolution2dLayer([4 4],32,'NumChannels',3,'Stride',1) %61x61x32
maxPooling2dLayer([2 2],'Stride',2) %31x31x32
convolution2dLayer([5 5],48,'NumChannels',32,'Stride',1) %27x27x48
maxPooling2dLayer([2 2],'Stride',2) %14x14x48
convolution2dLayer([5 5],64,'NumChannels','auto','Stride',1) %10x10x64
maxPooling2dLayer([2 2],'Stride',2) %5x5x64
convolution2dLayer([5 5],128,'NumChannels','auto','Stride',1) %1x1x128
fullyConnectedLayer(128)
reluLayer()
fullyConnectedLayer(cameras_number)
softmaxLayer()
classificationLayer
];
我已经计算了所有层输出的大小,它们似乎是正确的。如果我删除最后一个 maxpooling 层,网络可以工作,但它的性能不如我预期的那样好。