ShaoqingRen / faster_rcnn

Faster R-CNN
Other
2.68k stars 1.22k forks source link

Error parsing text-format caffe.NetParameter: 58:28:Message type "caffe.DropoutParameter" has no field named "scale_train" #166

Open ypaafw opened 7 years ago

ypaafw commented 7 years ago

when I try to test the faster_rcnn_VOC0712_ZF models ,one error occured: Protobuf : Error parsing text-format caffe.NetParameter: 58:28: Message type "caffe.DropoutParameter" has no field named "scale_train". . at D:\ThirdPartyLibrary\protobuf\src\google\protobuf\text_format.cc Line 296

error: caffe.getnet (line 27) hNet = caffe('get_net', model_file, phase_name);

error: caffe.Net (line 31) self = caffe.get_net(varargin{:});

error: script_faster_rcnn_demo (line 36) fast_rcnn_net = caffe.Net(proposal_detection_model.detection_net_def, 'test'); Could anyone tell me what happened? and how to solve it? I'm waiting online!!!!

HugoNip commented 6 years ago

the aim is to define the "scale_train" into "dropout_layer.cpp/cu/hpp"

  1. Replace the file "dropout_layer.cpp", "dropout_layer.cu" in caffe-master/src/caffe/layers/ with the same files in ./caffe-fast-rcnn/
  2. Replace the file "dropout_layer.hpp" in caffe-master/include/caffe/layers/ with the same files in ./caffe-fast-rcnn/
  3. Change the file "caffe-master/src/caffe/proto/caffe.proto" as the same as " caffe-fast-rcnn/src/caffe/proto/caffe.proto" in "message DropoutParameter{ }" part by adding "optional bool scale_train = 2 [default = true]; // scale train or test phase".