ubuntu下使用caffe运行mobilenet时由于缺少相关层容易报错,这时需要自己下载相关层的头文件和源文件,再次编译caffe
针对问题registry.count(type) == 1 (0 vs. 1) Unknown layer type:DepthwiseConvolution
1. 下载相关文件并拷贝
从https://github.com/yonghenglh6/DepthwiseConvolution下载文件,然后将其中的caffe/include/caffe/layers/拷贝到自己编译的caffe目录下的include//caffe/layers/,将其中的caffe/src/caffe/layers拷贝到自己编译的caffe目录下的src/caffe/layers/
2.重新编译caffe
cd ~/caffe/
make clean
make all -j8
make test -j8
make runtest -j8
make pycaffe
make pytest