ShaoqingRen / faster_rcnn

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

layer.hpp:385] Check failed: #177

Open xiaoxiangyeyuwangye opened 6 years ago

xiaoxiangyeyuwangye commented 6 years ago

Hi, everyone I am using matlab version faster rcnn code to train a model in windows. But when I run script_faster_rcnn_VOC2007_ZF it raised an error Error using caffe_ glog check error, please check log and clear mex

**Error in caffe.getsolver (line 7) pSolver = caffe('get_solver', solver_file);

Error in caffe.Solver (line 21) self = caffe.get_solver(varargin{:});

Error in proposal_train (line 49) caffe_solver = caffe.Solver(opts.solver_def_file);

Error in Faster_RCNN_Train.do_proposal_train (line 7) model_stage.output_model_file = proposal_train(conf, dataset.imdb_train, dataset.roidb_train,**

Error in script_faster_rcnn_VOC2007_ZF (line 45) model.stage1_rpn = Faster_RCNN_Train.do_proposal_train(conf_proposal, dataset, model.stage1_rpn, opts.do_val);

This is some lines in the error log file in output folder I0926 15:36:38.364075 11924 net.cpp:444] loss <- labels_weights_reshape I0926 15:36:38.364075 11924 net.cpp:418] loss -> loss_cls F0926 15:36:38.364075 11924 layer.hpp:385] Check failed: ExactNumBottomBlobs() == bottom.size() (2 vs. 3) SoftmaxWithLoss Layer takes 2 bottom blob(s) as input. F0926 15:36:38.364075 11924 layer.hpp:385] Check failed: ExactNumBottomBlobs() == bottom.size() (2 vs. 3) SoftmaxWithLoss Layer takes 2 bottom blob(s) as input.

Does anyone has any idea about this situation. Thanks for your help!

DaybreaksAds commented 6 years ago

I meet the same problem with you.Have you fixed it yet?

xiaoxiangyeyuwangye commented 6 years ago

Yeah, I have fixed it. This is because the caffe lib was edited by the authors of faster rcnn. The SoftmaxWithLoss Layer they used is not the same with the original caffe code. We need to compile the caffe provided by the authors. https://github.com/ShaoqingRen/caffe

qwertyDvo commented 5 years ago

Could you please explain how did you compile caffe?