Layer parameters in new Caffe version

1,126 views
Skip to first unread message

Ruud

unread,
Jun 15, 2016, 8:59:23 AM6/15/16
to Caffe Users
Hi everyone, 

I think I have an old prototext file that is incompatible with the latest Caffe release. For example this layer definition:


layers {
  bottom: "data"
  top: "conv1_1"
  name: "conv1_1"
  type: "CONVOLUTION"
  blobs_lr: 1
  blobs_lr: 2
  weight_decay: 1
  weight_decay: 0
  convolution_param {
    num_output: 64
    pad: 1
    kernel_size: 3
    weight_filler {
      type: "xavier"
    }
    bias_filler {
      type: "constant"
    }
  }
}



This is what I know:
  • 'layers' is now changed to 'layer.
  • Caffe cannot seem to parse blobs_lr and weight_decay anymore.
I get the following error while runing my old proottext:



[libprotobuf ERROR google/protobuf/text_format.cc:296] Error parsing text-format caffe.NetParameter: 70:11: Message type "caffe.LayerParameter" has no field named "blobs_lr".
F0615 14:54:09.531978  5669 upgrade_proto.cpp:68] Check failed: ReadProtoFromTextFile(param_file, param) Failed to parse NetParameter file: /home/ruud/DeepLab/exper-sweeper-2/sweeper/config/deeplab_vanilla/train_train.prototxt
*** Check failure stack trace: ***
    @     0x7f9519cbadaa  (unknown)
    @     0x7f9519cbace4  (unknown)
    @     0x7f9519cba6e6  (unknown)
    @     0x7f9519cbd687  (unknown)
    @     0x7f951a434a2e  caffe::ReadNetParamsFromTextFileOrDie()
    @     0x7f951a46d7e7  caffe::Solver<>::InitTrainNet()
    @     0x7f951a46e82c  caffe::Solver<>::Init()
    @     0x7f951a46eb5a  caffe::Solver<>::Solver()
    @     0x7f951a464643  caffe::Creator_SGDSolver<>()
    @           0x40ea6e  caffe::SolverRegistry<>::CreateSolver()
    @           0x407bb2  train()
    @           0x4059dc  main
    @     0x7f9518fc8f45  (unknown)
    @           0x406111  (unknown)
    @              (nil)  (unknown)
Aborted (core dumped)


Any insights are most welcome!
Ruud


Ruud

unread,
Jun 15, 2016, 9:25:35 AM6/15/16
to Caffe Users
Similarly, strict_dim seems deprecated? Or changed to something else perhaps?

layer {
  bottom: "pool5"
  top: "fc6"
  name: "fc6"
  type: "CONVOLUTION"
    strict_dim: false
...

[libprotobuf ERROR google/protobuf/text_format.cc:296] Error parsing text-format caffe.NetParameter: 685:15: Message type "caffe.ConvolutionParameter" has no field named "strict_dim".
F0615 15:23:08.096704  6563 upgrade_proto.cpp:68] Check failed: ReadProtoFromTextFile(param_file, param) Failed to parse NetParameter file: /home/ruud/DeepLab/exper-sweeper-2/sweeper/config/deeplab_vanilla/train_train.prototxt
*** Check failure stack trace: ***
    @     0x7f6101c30daa  (unknown)
    @     0x7f6101c30ce4  (unknown)
    @     0x7f6101c306e6  (unknown)
    @     0x7f6101c33687  (unknown)
    @     0x7f61023aaa2e  caffe::ReadNetParamsFromTextFileOrDie()
    @     0x7f61023e37e7  caffe::Solver<>::InitTrainNet()
    @     0x7f61023e482c  caffe::Solver<>::Init()
    @     0x7f61023e4b5a  caffe::Solver<>::Solver()
    @     0x7f61023da643  caffe::Creator_SGDSolver<>()
    @           0x40ea6e  caffe::SolverRegistry<>::CreateSolver()
    @           0x407bb2  train()
    @           0x4059dc  main
    @     0x7f6100f3ef45  (unknown)

Ruud

unread,
Jun 15, 2016, 10:17:13 AM6/15/16
to Caffe Users
This seems to work:

layer {
  bottom: "data"
  top: "conv1_1"
  name: "conv1_1"
  type: "Convolution"
  
  # These parameter do not seem to be parsed in the old caffe versions
  #blobs_lr: 1
  #blobs_lr: 2
  #weight_decay: 1
  #weight_decay: 0

  # These parameters should replace them in the new caffe version
  param {
    lr_mult: 1
    decay_mult: 1
  }
  param {
    lr_mult: 2
    decay_mult: 0
Reply all
Reply to author
Forward
0 new messages