Skip to content

Commit

Permalink
Update tvg_matcaffe_init.m
Browse files Browse the repository at this point in the history
update the matlab init model file.
  • Loading branch information
bittnt authored Jul 10, 2016
1 parent aa533ad commit 839f329
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions matlab/tvg_matcaffe_init.m
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,15 @@
error('Missing argument model_file');
end


% set to use GPU or CPU
if use_gpu
fprintf('Using GPU Mode\n');
caffe.set_mode_gpu();
caffe.set_device(gpu_id);
else
fprintf('Using CPU Mode\n');
caffe.set_mode_cpu();
end

if exist(model_file, 'file') ~= 2
error('You need a network model file');
Expand All @@ -27,14 +35,5 @@
fprintf('Done with set_phase_test\n');
fprintf('Done with init\n');

% set to use GPU or CPU
if use_gpu
fprintf('Using GPU Mode\n');
caffe.set_mode_gpu();
caffe.set_device(gpu_id);
else
fprintf('Using CPU Mode\n');
caffe.set_mode_cpu();
end
fprintf('Done with set_mode\n');

0 comments on commit 839f329

Please sign in to comment.