我想从我自己的咖啡馆模型中提取过滤器和偏差(不需要可视化功能),我想将它们保存到MATLAB的.mat文件中。我使用matcaffe来解决这个问题:
我的解决方法:
addpath('/home/jensen810814/code/caffe/matlab/caffe/');
addpath('/home/jensen810814/code/caffe/examples/super_resolution/');
addpath('/home/jensen810814/code/caffe/examples/super_resolution/Model/');
caffe('init','deploy.prototxt','super_resolution_iter_1000.caffemodel');
caffe('forward',{});
weights = caffe('get_weights');
save('/home/jensen810814/code/caffe/examples/super_resolution/filter_data.mat','weights');但是发生了一些错误:
Error using caffe
Expected 3 arguments, got 2
Error in model (line 4)
caffe('init','supe_resolution_train_test.prototxt','super_resolution_iter_1000.caffemodel');我不知道如何解决这个问题。有谁可以帮我?请多谢了。
发布于 2015-04-22 14:13:26
您需要为阶段名称'init'提供一个额外的参数。
我相信你的情况
caffe('init',...
'supe_resolution_train_test.prototxt',...
'super_resolution_iter_1000.caffemodel',...
'test');https://stackoverflow.com/questions/29669774
复制相似问题