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

Still... Unknown enumeration value of "MULTI_STAGE_MEANFIELD" for field "type". #20

Closed
anguszxd opened this issue Jun 14, 2016 · 3 comments

Comments

@anguszxd
Copy link

anguszxd commented Jun 14, 2016

Dear @martinkersner , thanks a lot for your contribution.
I'm trying to train CRFasRNN using other datasets instead of PASCAL VOC2012. As I'm not familiar with caffe, I run your training code first. However I faile when I try to run solve.py . It reports that:
**WARNING: Logging before InitGoogleLogging() is written to STDERR
I0614 20:21:07.813674 4671 solver.cpp:54] Initializing solver from parameters:
test_iter: 261
test_interval: 1333
base_lr: 1e-13
display: 50
max_iter: 100000
lr_policy: "fixed"
momentum: 0.99
weight_decay: 0.0005
snapshot: 1000
snapshot_prefix: "models/train"
solver_mode: GPU
net: "TVG_CRFRNN_COCO_VOC_TRAIN_3_CLASSES.prototxt"
test_initialization: false
I0614 20:21:07.813732 4671 solver.cpp:96] Creating training net from net file: TVG_CRFRNN_COCO_VOC_TRAIN_3_CLASSES.prototxt
[libprotobuf ERROR google/protobuf/text_format.cc:245] Error parsing text-format caffe.NetParameter: 226:3: Unknown enumeration value of "MULTI_STAGE_MEANFIELD" for field "type".
F0614 20:21:07.814872 4671 upgrade_proto.cpp:932] Check failed: ReadProtoFromTextFile(param_file, param) Failed to parse NetParameter file: TVG_CRFRNN_COCO_VOC_TRAIN_3_CLASSES.prototxt
*** Check failure stack trace: *****
I notice that you advise to check caffe version, but I really use caffe from https://github.com/torrvision/crfasrnn, and compile it successfully. I also run demo test script in folder crfasrnn/python-script. I'm confused now and don't know how to solve such problem.
An other issue in https://github.com/torrvision/crfasrnn/issues/45 also report this problem and the author solves it himself. But I still can't get the solution. Would you kindly check this problem? Thanks a lot and best wishes!

@martinkersner
Copy link
Owner

Hi @anguszxd,

It can be caused by one of two problems:

  1. You have installed more than one Caffe and you are running wrong version.
  2. You have recently downloaded and installed Caffe from torrvision which is updated with the newest version of Caffe, and therefore not compatible with prototxt files in this repository. However, it shouldn't be hard to make appropriate changes. You can inspire with this deploy protoxtx.

Cheers,

Martin

@anguszxd
Copy link
Author

Hi @martinkersner , thank you for your advice !
I update the prototxt file acorrding to TVG_CRFRNN_new_deploy.prototxt and it works now !
I find in solve.py
solver.net._caffe.set_mode_gpu() solver.net.set_device(0)
get error report:
*Traceback (most recent call last):
File "solve.py", line 50, in
solver.net.set_mode_gpu()
AttributeError: 'Net' object has no attribute 'set_mode_gpu'
*

Therefore I change it to
caffe._caffe.set_mode_gpu() caffe._caffe.set_device(0)
And it is training now.
Best wishes !

@manyaafonso
Copy link

Hi @martinkersner,
Thanks for sharing this code online.
I have the exact same problem.
Could you please be more specific in what would have to be different in the file TVG_CRFRNN_COCO_VOC_TRAIN_3_CLASSES.prototxt ?
I changed layers to layer and CONVOLUTION to Convolution but I still get the error
python solve.py 2>&1 | tee train.log
WARNING: Logging before InitGoogleLogging() is written to STDERR
I0526 13:14:56.328487 8179 solver.cpp:54] Initializing solver from parameters:
test_iter: 261
test_interval: 1333
base_lr: 1e-13
display: 50
max_iter: 100000
lr_policy: "fixed"
momentum: 0.99
weight_decay: 0.0005
snapshot: 1000
snapshot_prefix: "models/train"
solver_mode: GPU
net: "TVG_CRFRNN_COCO_VOC_TRAIN_3_CLASSES.prototxt"
test_initialization: false
I0526 13:14:56.328553 8179 solver.cpp:96] Creating training net from net file: TVG_CRFRNN_COCO_VOC_TRAIN_3_CLASSES.prototxt
[libprotobuf ERROR google/protobuf/text_format.cc:245] Error parsing text-format caffe.NetParameter: 5:9: Expected string.
F0526 13:14:56.328627 8179 upgrade_proto.cpp:932] Check failed: ReadProtoFromTextFile(param_file, param) Failed to parse NetParameter file: TVG_CRFRNN_COCO_VOC_TRAIN_3_CLASSES.prototxt
*** Check failure stack trace: ***

Thanks and best regards

edingroot added a commit to edingroot/train-CRF-RNN that referenced this issue Jun 13, 2017
… set_mode_gpu function from net, and instead use the caffe.set_mode_gpu.

Ref: martinkersner#20 (comment)
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

3 participants