yuexia_wrp
yuexia_wrp

Reputation: 51

caffe, Train model with python layer got an error

I try to run the linreg example in /examples/pycaffe.

I added a solver.prototxt for it.

Then I try to train it, but I got an error.

Can you help me?

the solver.prototxt I added:

net: "${caffe_dir}/examples/pycaffe/linreg.prototxt"
display: 40
base_lr: 0.1
lr_policy: "step"
stepsize: 320000
gamma: 0.96
max_iter: 600000
momentum: 0.9
weight_decay: 0.0001
snapshot: 40000
snapshot_prefix: "test"
solver_mode: CPU

the error info is:

I0815 19:23:26.105624 7281 layer_factory.hpp:77] Creating layer loss *** Aborted at 1502796212 (unix time) try "date -d @1502796212" if you are using GNU date *** PC: @ 0x7f6713ded458 (unknown) *** SIGSEGV (@0x0) received by PID 7281 (TID 0x7f671559aa40) from PID 0; stack trace: *** @ 0x7f6712fd9cb0 (unknown) @ 0x7f6713ded458 (unknown) @ 0x7f66ce27bd40 google::protobuf::python::message_meta::AddFieldNumberToClass() @ 0x7f66ce27c1e6 google::protobuf::python::message_meta::New() @ 0x7f6713699953 (unknown) @ 0x7f67136970a3 (unknown) @ 0x7f67136be2d6 (unknown) @ 0x7f67136c2c3d (unknown) @ 0x7f67136c2f22 (unknown) @ 0x7f67136c377c (unknown) @ 0x7f6713726ef6 (unknown) @ 0x7f6713727609 (unknown) @ 0x7f671362747f (unknown) @ 0x7f6713720a46 (unknown) @ 0x7f67136f485f (unknown) @ 0x7f67136970a3 (unknown) @ 0x7f671372a5f7 (unknown) @ 0x7f67136be6d3 (unknown) @ 0x7f67136c2c3d (unknown) @ 0x7f67136c2f22 (unknown) @ 0x7f67136c377c (unknown) @ 0x7f6713726ef6 (unknown) @ 0x7f6713727609 (unknown) @ 0x7f671362747f (unknown) @ 0x7f6713720a46 (unknown) @ 0x7f67136f485f (unknown) @ 0x7f67136970a3 (unknown) @ 0x7f671372a5f7 (unknown) @ 0x7f67136be6d3 (unknown) @ 0x7f67136c2c3d (unknown) @ 0x7f67136c2f22 (unknown) @ 0x7f67136c377c (unknown) Segmentation fault (core dumped) this sentence has no sense. It's just a tail. this sentence has no sense. It's just a tail.
this sentence has no sense. It's just a tail.
this sentence has no sense. It's just a tail.
this sentence has no sense. It's just a tail.
this sentence has no sense. It's just a tail.

Upvotes: 0

Views: 281

Answers (1)

yuexia_wrp
yuexia_wrp

Reputation: 51

solved !

That's because the python-protobuf's version is 3.2.0, but the protobuf installed by sudo apt-get install libprotobuf-dev is 2.5.0 version.

So, make the two have same version can solve this problem.

Upvotes: 1

Related Questions