shicai / DenseNet-Caffe

DenseNet Caffe Models, converted from https://github.com/liuzhuang13/DenseNet
355 stars 275 forks source link

我在用您的caffemodel做测试的时候遇到了如下的问题,请问一下如何解决 #10

Open gittigxuy opened 6 years ago

gittigxuy commented 6 years ago

WARNING: Logging before InitGoogleLogging() is written to STDERR W0805 10:26:38.720525 3101 _caffe.cpp:139] DEPRECATION WARNING - deprecated use of Python interface W0805 10:26:38.720546 3101 _caffe.cpp:140] Use this instead (with the named "weights" parameter): W0805 10:26:38.720549 3101 _caffe.cpp:142] Net('/home/xuy/桌面/code/python/caffe/Bag_gender_hair_classification/DenseNet_deploy_161.prototxt', 1, weights='/home/xuy/桌面/code/python/caffe/Bag_gender_hair_classification/model/DenseNet_161.caffemodel') [libprotobuf ERROR google/protobuf/text_format.cc:245] Error parsing text-format caffe.NetParameter: 54:14: Message type "caffe.PoolingParameter" has no field named "ceil_mode". F0805 10:26:38.740175 3101 upgrade_proto.cpp:88] Check failed: ReadProtoFromTextFile(param_file, param) Failed to parse NetParameter file: /home/xuy/桌面/code/python/caffe/Bag_gender_hair_classification/DenseNet_deploy_161.prototxt Check failure stack trace:

shicai commented 6 years ago

https://github.com/shicai/DenseNet-Caffe/issues/1

Ariel-JUAN commented 6 years ago

Hi, I install caffe using the anaconda, and I also have this error. But it looks like the the solution of #1 doesn't fit me, because I can't find the cpp files. Can you give me some advice? Thank you!

shicai commented 6 years ago

.... it is a old caffe, please find pooling_layer.h ,pooling_layer.cpp, and caffe.proto to add those lines of code.

LYC-vio commented 4 years ago

@shicai Hi, I've just found that this problem could be solved by changing the "ceil_mode: false" line to "round_mode: FLOOR" in the prototxt file to fit the new version of Caffe. The new version of Caffe use round_mode: CEIL/FLOOR to choose which mode to use (default CEIL).

I have tested this modification on Densenet161 and it didn't seem to affect the performance.