-
Notifications
You must be signed in to change notification settings - Fork 22
/
paramInit.m
executable file
·62 lines (49 loc) · 1.36 KB
/
paramInit.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
function opt = paramInit
opt.rootdir = './'; % revise if needed
opt.dataset = 'Office-Caltech10';
opt.modelType = 'VGG-VD-16';
opt.featureType = 'CONV';
% path seting
opt.datasetdir = fullfile(opt.rootdir, 'data', opt.dataset);
% set annotation path
opt.annotationdir = fullfile(opt.datasetdir, 'annotations');
% set source domain and target domain
opt.sourcedir = 'dslr';
opt.targetdir = 'caltech';
opt.nclasstrain = 20; % number of samples per class sampled
opt.ntrials = 20; % number of trials
opt.imagedir = 'images';
opt.cachedir = 'cache';
switch opt.dataset
case 'Office-Caltech10'
opt.classes={...
'back_pack'
'bike'
'calculator'
'headphones'
'keyboard'
'laptop_computer'
'monitor'
'mouse'
'mug'
'projector'
};
otherwise
error('Unsupported dataset')
end
% parameter setting
opt.nclasses = length(opt.classes);
% ntsl setting
opt.ntsl.proj_flag = 'complete'; % 'spatial', 'feature', 'complete'
opt.ntsl.d = [6, 6, 128, 20];
% tasl_orth setting
opt.taisl.proj_flag = 'complete'; % 'spatial', 'complete'
opt.taisl.d = [6, 6, 128, 20];
opt.taisl.lambda = 1e-5;
opt.taisl.maxiter = 5;
opt.taisl.maxiter_orth = 100;
opt.taisl.mtol = 5e-2;
opt.taisl.utol = 5e-2;
opt.taisl.record = false;
opt.taisl.verbose = false;
end