I'm trying to modify the weights of a caffemodel which is part of a caffe-branch called Deep Lab. Although there is a tutorial on <a href="http://nbviewer.jupyter.org/github/BVLC/caffe/blob/master/examples/net_surgery.ipynb" rel="nofollow">how to do net surgery</a>, when I try to do the same with my custom caffemodel the python kernel dies always on the following line:
# Load the original network and extract the fully connected layers' parameters. net = caffe.Net('../models/deeplab/train.prototxt', '../models/deeplab/train.caffemodel', caffe.TRAIN)
I think its because pycaffe doesn't know their custom layers such as
SegAccuracy so I removed these layers from the prototxt file, but still the python kernel keeps on dying when I try to load the network model. Does anyone know how to load these weights into python?
I found it already. I had literally to remove every custom layer and especially adapt the data layer such that it could read all the input images and thereby calculate the input dimensions.