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

does "caffe.LayerParameter" has no field named "interp_param". mean that i try to convert a layer that doesn't work? #3

Closed
JaspervDalen opened this issue Mar 7, 2018 · 7 comments

Comments

@JaspervDalen
Copy link

JaspervDalen commented Mar 7, 2018

I try to convert ICnet weights (https://github.com/hszhao/ICNet/tree/master/evaluation/model)
and get the following error:
[libprotobuf ERROR google/protobuf/text_format.cc:288] Error parsing text-format caffe.NetParameter: 20:16: Message type "caffe.LayerParameter" has no field named "interp_param".
WARNING: Logging before InitGoogleLogging() is written to STDERR
F0307 11:29:02.966812 2308428608 upgrade_proto.cpp:88] Check failed: ReadProtoFromTextFile(param_file, param) Failed to parse NetParameter file: icnet_cityscapes_bnnomerge.prototxt
*** Check failure stack trace: ***
Abort trap: 6

@pierluigiferrari
Copy link
Owner

Run the following code:

import caffe

prototxt_filename = 'path/to/deploy.prototxt'
caffemodel_filename = 'path/to/weights.caffemodel'

net = caffe.Net(prototxt_filename, 1, weights=caffemodel_filename)

Let me know what happens.

@JaspervDalen
Copy link
Author

the same error:

net = caffe.Net(prototxt_filename, 1, weights=caffemodel_filename)

[libprotobuf ERROR google/protobuf/text_format.cc:288] Error parsing text-format caffe.NetParameter: 20:16: Message type "caffe.LayerParameter" has no field named "interp_param".
WARNING: Logging before InitGoogleLogging() is written to STDERR
F0307 13:09:07.430896 2308428608 upgrade_proto.cpp:88] Check failed: ReadProtoFromTextFile(param_file, param) Failed to parse NetParameter file: icnet_cityscapes_bnnomerge.prototxt
*** Check failure stack trace: ***
Abort trap: 6

@pierluigiferrari
Copy link
Owner

pierluigiferrari commented Mar 7, 2018

This means there is a problem with your Caffe installation. What you could try next is to load a very basic model like VGG instead of ICnet to see if that works. If your Caffe installation works at all, then that should definitely work. If you can load something like VGG correctly, then the cause of the error above can be narrowed down to the authors of ICnet requiring a specific version of Caffe. Do the authors of ICnet require a specific version of Caffe, or do they maybe even use their own modified version of Caffe? If yes, you will need to install that exact version of Caffe.

@JaspervDalen
Copy link
Author

It works with VGG and it seems you are right about a specific caffe version. They use a version used by PSP net which uses a modified version of DeepLab2 which explains why it doens't work. Thanks!

@pierluigiferrari
Copy link
Owner

You're welcome! It's a pain in the ass with many Caffe models and the custom Caffe versions they require, I've had to deal with that myself several times.

@leoluopy
Copy link

solved it by reference to https://www.cnblogs.com/wmr95/p/8715607.html

@AGroupofProbiotocs
Copy link

solved it by reference to https://www.cnblogs.com/wmr95/p/8715607.html

Thank you! It really helps!

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

4 participants