Skip to content

Commit

Permalink
Update spp_demo.m
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaoqingRen committed Jun 4, 2015
1 parent 3a4be95 commit 5dba241
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions spp_demo.m
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
function spp_demo()
clear mex;

spp_model_file = '.\data\spp_model\VOC2007\spp_model.mat';
if ~exist(spp_model_file, 'file')
Expand All @@ -13,9 +14,9 @@ function spp_demo()
caffe_net_def_file = fullfile(pwd, 'data\cnn_model\Zeiler_conv5\Zeiler_spm_scale224_test_conv5.prototxt');

use_gpu = true;
gpu_id = 1;
if use_gpu
clear mex;
g = gpuDevice(1);
gpuDevice(gpu_id);
end

caffe('init', caffe_net_def_file, caffe_net_file);
Expand Down Expand Up @@ -46,5 +47,5 @@ function spp_demo()
caffe('release');

if use_gpu
reset(g);
gpuDevice([]);
end

0 comments on commit 5dba241

Please sign in to comment.