unsky / Deformable-ConvNets-caffe

Deformable Convolutional Networks on caffe
160 stars 83 forks source link

shape mismatch #28

Closed foralliance closed 6 years ago

foralliance commented 6 years ago

@unsky HI 按照READEME成功将deformable_conv嫁接到了多个自己的caffe中,如:py-R-FCN

但在进行检验,即执行./experiments/scripts/faster_rcnn_end2end.sh 0 ResNet50 pascal_voc的时候,总会报如下错误:

F0626 16:18:14.308534 28297 net.cpp:784] Cannot copy param 0 weights from layer 'res5a_branch2b'; shape mismatch.  Source param shape is 512 512 3 3 (2359296); target param shape is 512 128 3 3 (589824). To learn this layer's parameters from scratch rather than copying from a saved net, rename the layer.
*** Check failure stack trace: ***

而在Deformable-ConvNets-caffe/deformable_conv_faster-rcnn下执行,就不会出现该错误.

同样的train.prototxt文件(用的是Deformable-ConvNets-caffe/deformable_conv_faster-rcnn下的文件),同样的预训练模型,为什么会出现不匹配的情况呢??

foralliance commented 6 years ago

问题已解决,主要是因为caffe.proto的参数不同

Github主页下提供的是: optional uint32 group = 5 [default = 4]; 而Deformable-ConvNets-caffe/deformable_conv_faster-rcnn下提供的是: optional uint32 group = 5 [default = 1]; 所以会出现上述的步匹配!!

谢谢