caffe: test code 执行出问题: Check failed: FLAGS_weights.size() > 0 (0 vs. 0) Need model weights to score.

Check failed: FLAGS_weights.size() > 0 (0 vs. 0) Need model weights to score.

出现这个错误,但是我记得昨天还好好的,网上搜了也没有答案,后来仔细检查才发现,原来存放 .caffemodel 的文件名字 中间有空格!!!

把文件夹路径上的名字去掉,果断就可以了。。。

 

solver_proto=/home/wangxiao/Downloads/caffe-master/wangxiao/bvlc_alexnet/test.prototxt

weights_solverstate=/home/wangxiao/Downloads/caffe-master/wangxiao/bvlc_alexnet/Untitled_Folder/_iter_450000.caffemodel

log_filename=/home/wangxiao/Downloads/caffe-master/wangxiao/bvlc_alexnet/log_files/test_web_data_1.log

./build/tools/caffe test \
--model=$solver_proto  --weights=$weights_solverstate  2>&1 | tee -a $log_filename

 

posted @ 2016-03-12 09:21  AHU-WangXiao  阅读(1094)  评论(1编辑  收藏  举报