ShuffleNet MobileNet 在caffe训练加速方法

 

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.替换相应的层的名字

发布了14 篇原创文章 · 获赞 37 · 访问量 9万+

猜你喜欢

转载自blog.csdn.net/CVAIDL/article/details/90479136