caffe添加新层caffe.proto如何设置

请问caffe中新写了一个layer里面设置了新的参数,在caffe.proto里面怎么修改?
已邀请:

陶潜水

赞同来自: zhuxihuai

现在message LayerParameter {}里面添加层的参数的名称,并且赋予其一个编号,和其他层不一样就可以了,比如:optional CenterLossParameter center_loss_param = 147;
然后再写个这层参数的具体内容,比如:
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];
}

要回复问题请先登录注册