训练caffe:registry.count(type) == 0 (1 vs. 0) Solver type Nesterov already registered

命令:./continue-train.sh

内容:../../caffe-master/build/tools/caffe train -gpu=$1 -solver=solver.prototxt  2>&1 | tee $LOG

错误:

I0425 08:26:13.348503 19309 layer_factory.hpp:77] Creating layer input_layer
F0425 08:26:13.412329 19309 solver_factory.hpp:67] Check failed: registry.count(type) == 0 (1 vs. 0) Solver type Nesterov already registered.

解决问题网址:https://groups.google.com/forum/#!topic/caffe-users/Pqs2xNKO9X4

猜测是PYTHONPATH的问题,因为这里我copy了一份caffe,我使用的是copy之后的caffe,但是没有将它加到PYTHONPATH里.

 

猜测是对的.vim ~/.bashrc,   source~/.bashrc.

错误:

This program requires version 3.4.0 of the Protocol Buffer runtime library, but the installed version is 2.6.1. Please update your library. If you compiled the program yourself, make sure that your headers are from the same version of Protocol Buffers as your link-time library. (Version verification failed in "google/protobuf/descriptor.pb.cc".)
terminate called after throwing an instance of 'google::protobuf::FatalException

参考网址:https://github.com/BVLC/caffe/issues/5711

我的解决方法:

protoc --version: 得到的版本是2.6.1, 但是pip中安装的protobuf 是3.4.0版本的.所以可能是这两个版本不匹配造成的.

sudo pip uninstall protobuf

sudo pip install protobuf==2.6.1

现在可以正常训练了.

 

posted @ 2018-04-25 09:03  笨笨coding  阅读(994)  评论(0编辑  收藏  举报