Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error parsing text-format caffe.NetParameter #3947

Closed
edanamerchan opened this issue Apr 5, 2016 · 8 comments
Closed

Error parsing text-format caffe.NetParameter #3947

edanamerchan opened this issue Apr 5, 2016 · 8 comments

Comments

@edanamerchan
Copy link

I'm trying to run an example but I get this error:

$ python caffe_feature_extractor.py -i test/temp.txt -o out.txt
<property object at 0x27495d0>
Reading images from " test/temp.txt
Writing vectors to " out.txt
WARNING: Logging before InitGoogleLogging() is written to STDERR
E0405 18:54:10.296026 33623 common.cpp:104] Cannot create Cublas handle. Cublas won't be available.
E0405 18:54:10.296254 33623 common.cpp:111] Cannot create Curand generator. Curand won't be available.
[libprotobuf ERROR google/protobuf/text_format.cc:274] Error parsing text-format caffe.NetParameter: 6:15: Message type "caffe.LayerParameter" has no field named "input_param".
F0405 18:54:10.311813 33623 upgrade_proto.cpp:68] Check failed: ReadProtoFromTextFile(param_file, param) Failed to parse NetParameter file: /apps/testsuite/caffe/models/bvlc_googlenet/deploy.prototxt
*** Check failure stack trace: ***
Aborted

Thanks for your help.

@trandinh
Copy link

trandinh commented Apr 7, 2016

Did you solved your problem?
I got the same problem about parsing text-format. I use c++ not python.
Someone suggest the problem cause the version of libprotobuf is not correct with the format in .prototxt file.
The solution is we have to upgrade proto, but I don't know how to upgrade proto in caffe.
If any one have experience about this please help me.
error_libprotobuf

@lukeyeager
Copy link
Contributor

Message type "caffe.LayerParameter" has no field named "input_param".

You need to update your build of Caffe. input_param was added with #3211 on 02/27.

@ajtulloch
Copy link
Contributor

Yep, @lukeyeager is correct.

@hana9090
Copy link

How to upgrade this?

@ajtulloch
Copy link
Contributor

Run upgrade_net.cpp

@hana9090
Copy link

how to run?
cpp upgrade_net.cpp?
at which directory?

@anbai106
Copy link

anbai106 commented Oct 24, 2016

Sorry to reopen this issue again, I had the same problem when i run olver = caffe.SGDSolver('fcn_solver.prototxt')

WARNING: Logging before InitGoogleLogging() is written to STDERR I1024 11:45:08.993687 2078609408 solver.cpp:48] Initializing solver from parameters: train_net: "fcn_train.prototxt" test_net: "fcn_test.prototxt" test_iter: 26 test_interval: 200 base_lr: 0.01 display: 200 max_iter: 15000 lr_policy: "multistep" gamma: 0.1 momentum: 0.9 weight_decay: 0.0005 snapshot: 2500 snapshot_prefix: "./model_logs/fcn" random_seed: 5 test_initialization: true average_loss: 200 stepvalue: 10000 I1024 11:45:08.994006 2078609408 solver.cpp:81] Creating training net from train_net file: fcn_train.prototxt [libprotobuf ERROR google/protobuf/text_format.cc:298] Error parsing text-format caffe.NetParameter: 256:5: Non-repeated field "name" is specified multiple times. F1024 11:45:08.994349 2078609408 upgrade_proto.cpp:88] Check failed: ReadProtoFromTextFile(param_file, param) Failed to parse NetParameter file: fcn_train.prototxt *** Check failure stack trace: ***

My protoc version is
libprotoc 3.1.0

when I build caffe, I did not use this command from official site: brew install --build-from-source --with-python -vd protobuf
Instead, I just run brew install protobuf, So i think it is the newest version, I dont know if it is the problem???

But I dont know how to upgrade the build of CAFFE, can anyone give me a hint??? and the reference you mentioned does not have the solution...
Thanks in advance:)

@gittigxuy
Copy link

@anbai106 I have the same question ,did you solve the problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants