Permalink
Browse files

add default path for caffe

  • Loading branch information...
1 parent 018d4b8 commit 6b198176d854661942eb167764e37877dd9251ec @ShaoqingRen committed Sep 22, 2015
Showing with 7 additions and 0 deletions.
  1. +7 −0 utils/active_caffe_mex.m
@@ -14,6 +14,13 @@ function active_caffe_mex(gpu_id, caffe_version)
end
cur_dir = pwd;
caffe_dir = fullfile(pwd, 'external', 'caffe', 'matlab', caffe_version);
+
+ if ~exist(caffe_dir, 'dir')
+ warning('Specified caffe folder (%s) is not exist, change to default one (%s)', ...
+ caffe_dir, fullfile(pwd, 'external', 'caffe', 'matlab'));
+ caffe_dir = fullfile(pwd, 'external', 'caffe', 'matlab');
+ end
+
addpath(genpath(caffe_dir));
cd(caffe_dir);
caffe.set_device(gpu_id-1);

0 comments on commit 6b19817

Please sign in to comment.