1.MATLAB示例程序:
%% Load the Caffe.Net and save in model file.
def = fullfile('..', 'models', 'VGG_CNN_M_1024', 'test.prototxt');
net = fullfile('..', 'output', 'default', 'voc_2007_trainval', ...
'vgg_cnn_m_1024_fast_rcnn_iter_40000.caffemodel');
ConvNet = caffe.Net(def, net, 'test');
save model/ConvNet ConvNet
其中,def
为网络的test.prototxt文件路径,net
为caffe训练得到caffemodel文件路径。调用caffe.Net可以获得MATLAB可以解析的数据形式(矩阵形式),如下所示:
(示例为Small VGG训练后,转成的Matlab形式的模型参数)
<