I need to update a caffe model from an existing caffe model where I will drop last two layers. It is needed to reduce caffe model size so that it would be easier and lesser size to deploy. Say my existing caffe model is A1.caffemodel which has 5 convolution layers and 3 fully connected layers. I want to generate a new model from it named B1.caffemodel which will have 5 convolution layers and 1 fully connected layer (last 2 fc layers discarded).
I appreciate your all valuable suggestions and helpful code snippet.