ShuffleNet参考:https://github.com/farmingyard/ShuffleNe1.
1.将cpp 和cu文件复制到caffe/src/caffe/layers目录下,将hpp文件复制到caffe/include/caffe/layers/目录下,
2.修改在caffe/src/caffe/proto目录下的caffe.proto文件
message LayerParameter {
...
optional ShuffleChannelParameter shuffle_channel_param = 164;
...
}
...
message ShuffleChannelParameter {
optional uint32 group = 1[default = 1]; // The number of group
}
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
3.编译caffe
cd caffe_ROOT
make all -j8
MobileNet参考:https://github.com/yonghenglh6/DepthwiseConvolution
1.将cpp 和cu文件复制到caffe/src/caffe/layers目录下,将hpp文件复制到caffe/include/caffe/layers/目录下,
2.编译caffe
cd caffe_ROOT
make all -j8
3.替换相应的层的名字
博客介绍了ShuffleNet和MobileNet在Caffe中的配置步骤。对于ShuffleNet,需复制相关文件到指定目录,修改caffe.proto文件并编译caffe;对于MobileNet,同样复制文件到指定目录,编译caffe后替换相应层的名字,还给出了两者的参考链接。
980

被折叠的 条评论
为什么被折叠?



