faster_rcnn icon indicating copy to clipboard operation
faster_rcnn copied to clipboard

layer.hpp:385] Check failed:

Open xiaoxiangyeyuwangye opened this issue 7 years ago • 3 comments

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.get_solver (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!

xiaoxiangyeyuwangye avatar Sep 26 '17 07:09 xiaoxiangyeyuwangye

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

DaybreaksAds avatar Apr 29 '18 07:04 DaybreaksAds

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

xiaoxiangyeyuwangye avatar May 01 '18 09:05 xiaoxiangyeyuwangye

Could you please explain how did you compile caffe?

qwertyDvo avatar Dec 01 '18 21:12 qwertyDvo