My caffe was working fine until couple of days ago. I wrote a new layer and compiled again. Now, when I'm trying to do net surgery, during the step net.params['layer_name'].data, I get an error that states
if len(lr.blobs) > 0])OverflowError: long int too large to convert to int,
*** glibc detected *** /path/to/anaconda/python2.7: munmap_chunk(): invalid pointer: 0x0000000006cabb38 ***
and the program crashes. If I try to do forward prop alone, to make predictions, the code runs and once it is done, it still prints stuff related to glibc.
I see that someone has already encountered the same problem
and reported a bug here. They posted a work around for this issue. In their solution, he/she read net using google-protocol buffer in Python directly. For me, reading my net with the following lines of code:
net = caffe.proto.caffe_pb2.NetParameter()
net.ParseFromString(open(trainedNetwork.caffemodel).read())
reads the net, but I'm not sure how to use it to access/modify weights; net.layers returns an empty iterable. Can anyone help me figure out how to solve the overflow issue ?
Thanks!