Open mrgransky opened 4 years ago
I've found that this problem (has no field named "ceil_mode") 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.
Hope this can help.
Tnx for the update, now I get the following error:
Cannot copy param 0 weights from layer 'conv1'; shape mismatch. Source param shape is 96 3 7 7 (14112); target param shape is 64 3 7 7 (9408). To learn this layer's parameters from scratch rather than copying from a saved net, rename the layer.
*** Check failure stack trace: ***
Aborted (core dumped)
It seems conv1
should be renamed to something cuz I found similar issue ppl solved this new problem here, but how do we fix it for DenseNet161
?
Did u encounter the same problem?
Sorry, I didn't encounter this problem. Maybe you can check whether your .caffemodel file matches the .prototxt file correctly... I mean, the conv1 layer of DenseNet_121 and DenseNet_169 is 64 3 7 while the conv1 layer of DenseNet_161 is 96 3 7, maybe you have mismatched DenseNet_169.caffemodel to DenseNet_161.prototxt or something like that I guess?
Oohh! yes, u're absolutely right!
I had mistakenly had different weight.caffemodel
and deploy.prototxt
files! now it works flawless with modification u suggested: replace ceil_mode: false
in deploy.prototxt
to round_mode: FLOOR
.
Cheers,
Congrats! Happy to hear that!
In another PC in which caffe-gpu
is installed via anaconda, I get error for both ceil_mode: false
and round_mode: FLOOR
though!
deploy.prototxt
with ceil_mode: false
:
[libprotobuf ERROR google/protobuf/text_format.cc:307] Error parsing text-format caffe.NetParameter: 54:14: Message type "caffe.PoolingParameter" has no field named "ceil_mode".
WARNING: Logging before InitGoogleLogging() is written to STDERR
F0517 18:27:14.369987 16944 upgrade_proto.cpp:88] Check failed: ReadProtoFromTextFile(param_file, param) Failed to parse NetParameter file: MODELS/DenseNet161/ImageNet/deploy.prototxt
*** Check failure stack trace: ***
Aborted
deploy.prototxt
with round_mode: FLOOR
:
[libprotobuf ERROR google/protobuf/text_format.cc:307] Error parsing text-format caffe.NetParameter: 54:15: Message type "caffe.PoolingParameter" has no field named "round_mode".
WARNING: Logging before InitGoogleLogging() is written to STDERR
F0517 18:32:19.467856 17462 upgrade_proto.cpp:88] Check failed: ReadProtoFromTextFile(param_file, param) Failed to parse NetParameter file: MODELS/DenseNet161/ImageNet/deploy.prototxt
*** Check failure stack trace: ***
Aborted
This is my python specification and caffe version:
Python 2.7.17 |Anaconda, Inc.| (default, Oct 21 2019, 19:04:46)
[GCC 7.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import caffe
>>> caffe.__version__
'1.0.0'
I also noticed #32 is an open issue regarding this but is there any workaround for anaconda version of caffe?
I don't have any idea about this error message... A possible solution is to check those corresponding lines mentioned by https://github.com/BVLC/caffe/pull/3057/files (see also #1) in caffe-gpu from anaconda to see what params are actually used and modify the .prototxt file.
Alternatively, you can install another caffe from source code and use sys.path.insert to specify which caffe to use. eg:
import sys
sys.path.insert(0,"path/to/your/caffe/python")
import caffe
@LYC-vio I'm afraid installing caffe from source is an option cuz this a univ GPU clusters and we do not get sudo
prriviledge for package installation/manipulation!
Loading
.caffemodel
anddeploy.ptototxt
in caffe forTEST
phase returns the following error:ur Baidu link (https://pan.baidu.com/s/1gfjD8cF) seems to be broken too! Do u have updated version of that link?