首页 > 其他 > 详细

如何向caffe中添加层

时间:2017-07-19 16:15:16      阅读:388      评论:0      收藏:0      [点我收藏+]

修改caffe\src\caffe\proto\caffe.proto

在最后添加centerloss层的参数信息

 

message CenterLossParameter {
optional uint32 num_output = 1; // The number of outputs for the layer
optional FillerParameter center_filler = 2; // The filler for the centers
// The first axis to be lumped into a single inner product computation;
// all preceding axes are retained in the output.
// May be negative to index from the end (e.g., -1 for the last axis).
optional int32 axis = 3 [default = 1];
}

 

添加层类型信息,注意不能与其他层的数字相同。

 

optional CenterLossParameter center_loss_param = 148;

将cpu和gpu两个模式下运行的文件添加到src\caffe\layers\

如何编写层,请查看官方文档或者谷歌

3.添加层的头文件

向\include\caffe\layers\中添加头文件

 

如何向caffe中添加层

原文:http://www.cnblogs.com/HugoLester/p/7206319.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!