caffe测试错误测试MNIST时没有名为“net”的字段

时间:2016-08-20 04:16:13

标签: machine-learning neural-network deep-learning caffe mnist

我在测试MNIST时遇到与Caffe error: no field named "net"相同的问题。

正在运行

keides2@ubuntu:~/caffe$ build/tools/caffe test -model examples/mnist/lenet_solver.prototxt 
                       -weights examples/mnist/lenet_iter_10000.caffemodel -iterations 100

我得到以下输出:

 I0820 11:31:33.820005 113569 caffe.cpp:279] Use CPU. [libprotobuf ERROR google/protobuf/text_format.cc:245] Error parsing text-format caffe.NetParameter: 2:4: Message type "caffe.NetParameter" has no field named "net".
F0820 11:31:33.844912 113569 upgrade_proto.cpp:79] Check failed: ReadProtoFromTextFile(param_file, param) Failed to parse NetParameter file: examples/mnist/lenet_solver.prototxt
Check failure stack trace:
@     0x7f3f9744edaa  (unknown) 
@     0x7f3f9744ece4  (unknown) 
@     0x7f3f9744e6e6  (unknown) 
@     0x7f3f97451687  (unknown) 
@     0x7f3f977fc0c7  caffe::ReadNetParamsFromTextFileOrDie() 
@     0x7f3f97834b0f  caffe::Net<>::Net() 
@           0x407843  test() 
@           0x405f7b  main 
@     0x7f3f9645af45  (unknown) 
@           0x406677  (unknown) 
@              (nil)  (unknown)

'lenet_solver.prototxt''lenet_train_test.prototxt'是原创的(未修改)。

然后,

keides2@ubuntu:~/caffe$ printenv PYTHONPATH
/home/keides2/caffe/python

你能帮帮我吗?

1 个答案:

答案 0 :(得分:0)

运行$posts = DB::select('SELECT * FROM posts'); 时,您不需要解算器文件(在您的情况下为caffe test),而是直接使用网络原型。
尝试:

lenet_solver.prototxt