【caffe添加新层】通道复制层ChCopy
2017-11-20 本文已影响93人
Scharlie
该层的作用是将n*1*h*w维度的数据复制成n*copynum*h*w维的数据。
1.首先是.hpp和.cpp文件的编写,源码如下
《.hpp文件》

《.cpp文件》



《caffe.proto文件修改》:在message中声明chcopy参数,以及重用该参数

进入caffe根目录,
make clean
make all
make all -j8
2.使用时,写好相应的prototxt文件,即可