Net surgery: How to reshape a convolution layer of a caffemodel file in caffe?
I'm trying to reshape the size of a convolution layer of a caffemodel (This is a follow-up question to this question ). Although there is a tutorial on how to do net surgery , it only shows how to copy weight parameters from one caffemodel to another of the same size. Instead I need to add a new channel (all 0) to my convolution filter such that it changes its size from currently ( 64 x 3 x 3 x 3 ) to ( 64 x 4 x 3 x 3 ). Say the convolution layer is called 'conv1' . This is what I tried so far: # Load the original network and extract the fully connected layers' parameters. net = caffe.Net('..