caffe matlab 提取全链接层特zheng
生活随笔
收集整理的這篇文章主要介紹了
caffe matlab 提取全链接层特zheng
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
clc;
clear all;
addpath('..') %加入+caffe路徑
load da2.mat
%%
% caffe.set_mode_cpu();%設置CPU模式
model = 'deploy.prototxt';%模型
weights = 'lenet_iter_2066.caffemodel';%參數net=caffe.Net(model,'test');%測試
net.copy_from(weights); %得到訓練好的權重參數
IMAGE_SIZE = [60, 36];
net.blobs('data').reshape([ 60 36 1 1]);
m=size(data);
feature2=[];
for i=1:m(3)
image = data(:,:,i);
image=imresize(image,IMAGE_SIZE);
paramer=cell(2);image=single(image);
headpose=single(headpose);
paramer{1}=image;
paramer{2}=headpose(:,i);
out = net.forward(paramer);result = net.blobs('cat').get_data();feature2=[feature2 result];end
總結
以上是生活随笔為你收集整理的caffe matlab 提取全链接层特zheng的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 能用的谷歌网址大全
- 下一篇: Python中文问题 或 SyntaxE