How to use matcaffe to extract filters
Hi all, I'm trying to extract filters and biases by matcaffe. The following is my code:
addpath('/home/jensen810814/code/caffe/matlab/caffe/'); addpath('/home/jensen810814/code/caffe/examples/super_resolution/'); addpath('/home/jensen810814/code/caffe/examples/super_resolution/super_resolution_lmdb_data/'); addpath('/home/jensen810814/code/caffe/examples/super_resolution/Model/'); caffe('init','deploy.prototxt', 'super_resolution_iter_1000.caffemodel','test'); caffe('forward',{}); weights = caffe('get_weights'); save('/home/jensen810814/code/caffe/examples/super_resolution/filter_data.mat','weights');
But it shows an error message :
Error using caffe Invalid input size Error in model (line 9) caffe('forward',{});
I dont know what the error mean and how to solve it. I am a beginner in caffe,..can anyone help me? Please and thanks.
@jensen810814 You don't need to have "caffe('forward',{});", simply get_weights after you initialize
it works!! Thanks for your answer !! So kind of you.
I'm happy to see an answer from the community, but please ask usage questions on the caffe-users group.