Relationship between Python layer segfault and a parameter name in caffe.proto

29 views
Skip to first unread message

Seong Joon Oh

unread,
Aug 15, 2016, 7:30:22 AM8/15/16
to Caffe Users
(This is a follow-up question from https://groups.google.com/forum/#!topic/caffe-users/Ek6j1gPGQ-U. But you don't need to read it.)

I did a controlled experiment with caffe source codes. Consider the following two identical source codes with the only difference in the parameter name in caffe.proto:


1. One of the layers has parameter definition
"""
optional MultiStageMeanfieldParameter multi_stage_meanfield_param = 145;
"""
and likewise for all the occurrences of this parameter in the .cpp and .hpp files corresponding to this layer.


2. The same layer now has parameter definition
"""
optional JoonTmpParameter joon_tmp_param = 145; 
"""
and likewise for all the occurrences of this parameter in the .cpp and .hpp files corresponding to this layer.


So the only difference in the source codes is in how we name the same parameter.
However, when compiled, 1. gives segfault during python layer setup, while 2. successfully does it.
(Moreover, 2. runs without error in a pycaffe training code for a complicated network composed of multiple python layers.)

This is a big mystery for me.
Was it the length of the parameter name that caused the segfault for python layer setup?
Why then would the python layer setup be related to the name of a layer parameter which has nothing to do with the python layer?

Does anyone have an explanation?
Does anyone have a pointer?

Joon
Reply all
Reply to author
Forward
0 new messages