forked from suhangpro/mvcnn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun_experiments.m
69 lines (65 loc) · 2.33 KB
/
run_experiments.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
63
64
65
66
67
68
69
% function run_experiments()
setup;
expDir = 'data';
%% modelnet experiments (w/ upright assumption)
get_imdb('modelnet40v1', ...
'func', @(s) setup_imdb_modelnet(s,'useUprightAssumption',true), ...
'rebuild', true);
% phase 1 -- regular cnn
cnn_shape('modelnet40v1', ...
'expDir', fullfile(expDir,'modelnet40v1'), ...
'numFetchThreads', 12, ...
'pad', 32, ...
'border', 32, ...
'multiview', false, ...
'batchSize', 60, ...
'gpus', [1], ...
'maxIterPerEpoch', Inf, ...
'numEpochs', [15 10 15], ...
'learningRate', [0.05*ones(1,10) 0.01*ones(1,20) 0.001*ones(1,5) 0.0001*ones(1,5)] ...
);
% phase 2 -- mvcnn
cnn_shape('modelnet40v1', ...
'expDir', fullfile(expDir,'modelnet40v1_mv'), ...
'numFetchThreads', 12, ...
'pad', 32, ...
'border', 32, ...
'baseModel', fullfile(expDir,'modelnet40v1','net-deployed.mat'), ...
'multiview', true, ...
'viewpoolPos', 'conv5', ...
'batchSize', 5, ...
'gpus', [1], ...
'maxIterPerEpoch', Inf, ...
'numEpochs', [0 15 15], ...
'learningRate', [0.005*ones(1,5) 0.001*ones(1,5) 0.0001*ones(1,10) 0.00001*ones(1,10)] ...
);
%% shapenet experiments (w/ upright assumption)
get_imdb('shapenet55v1', ...
'func', @(s) setup_imdb_shapenet(s,'nViews',12,'useSubclass',false), ...
'rebuild', true);
% phase 1 -- regular cnn
cnn_shape('shapenet55v1', ...
'expDir', fullfile(expDir,'shapenet55v1'), ...
'numFetchThreads', 12, ...
'multiview', false, ...
'batchSize', 84, ...
'gpus', [1], ...
'maxIterPerEpoch', [1000 200], ... % limiting 1000 iters/epoch at training and 200 iters/epoch at testing
'balancingFunction', @(v) round(mean(v)*(v/mean(v)).^0.5), ...
'numEpochs', [15 10 15], ...
'learningRate', [0.05*ones(1,10) 0.01*ones(1,10) 0.001*ones(1,10) 0.0005*ones(1,10)] ...
);
% phase 2 -- mvcnn
cnn_shape('shapenet55v1', ...
'expDir', fullfile(expDir,'shapenet55v1_mv'), ...
'numFetchThreads', 12, ...
'baseModel', fullfile(expDir,'shapenet55v1','net-deployed.mat'), ...
'multiview', true, ...
'viewpoolPos', 'relu7', ...
'batchSize', 7, ...
'gpus', [1], ...
'maxIterPerEpoch', [1000 200], ... % limiting 1000 iters/epoch at training and 200 iters/epoch at testing
'balancingFunction', @(v) round(mean(v)*(v/mean(v)).^0.5), ...
'numEpochs', [0 20 20], ...
'learningRate', [0.005*ones(1,10) 0.001*ones(1,15) 0.0001*ones(1,10) 0.00005*ones(1,5)] ...
);