CNN中图层尺寸的问题

时间:2018-02-24 16:10:07

标签: matlab neural-network convolution max-pooling

我从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图层,网络可以正常工作,但效果不如预期。

0 个答案:

没有答案