Error: Adding field to caffe.proto fails

16 views
Skip to first unread message

AlbertMiao

unread,
Sep 22, 2017, 4:55:04 AM9/22/17
to Caffe Users
Hi! I'm currently re-impelementing a project using caffe. The project needs to modify the message "MemoryDataParameter" in caffe.proto to add a field "optional uint32 label_size = 5". I also added some functions corresponding to this field to "memory_data_layer.cpp" and "memory_data_layer.hpp".
After I rebuilt caffe, I checked that label_size field exists in caffe.MemoryDataParameter inside caffe.pb.cc, but when I run the project, I got the following error message:



--------------------------------------

I0922 16:43:51.676110 2112348160 solver.cpp:87] Creating training net from net file: data/policies/dog/nets/dog_mace3_train.prototxt

[libprotobuf ERROR google/protobuf/text_format.cc:288] Error parsing text-format caffe.NetParameter: 14:19: Message type "caffe.MemoryDataParameter" has no field named "label_size".

F0922 16:43:51.676177 2112348160 upgrade_proto.cpp:88] Check failed: ReadProtoFromTextFile(param_file, param) Failed to parse NetParameter file: data/policies/dog/nets/dog_mace3_train.prototxt

*** Check failure stack trace: ***

Abort trap: 6

--------------------------------------


It seems that "label_size" field has not been detected, which is so weird. Could you help me with this problem? Thanks a lot in advance!

Reply all
Reply to author
Forward
0 new messages