forked from yindaz/DeepCompletionRelease
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig_scannet.lua
executable file
·71 lines (59 loc) · 2.75 KB
/
config_scannet.lua
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
70
71
require "utils"
--- All parameters goes here
local config = config or {}
function config.parse(arg)
local cmd = torch.CmdLine()
cmd:text()
cmd:text('Multi-Task Classification FCN')
cmd:text()
-- Parameters
-- model configuration
cmd:option('-model', 'model_deep.lua', 'model file')
cmd:option('-model_nobn', 'model_deep_new.lua', 'model file without the last bn layer')
cmd:option('-input_channel', 3, '# of input channels')
cmd:option('-output_channel', 3, '# of output channels')
-- testing
cmd:option('-test_model', '', 'model used for testing')
cmd:option('-result_path', './result/', 'path to save result')
cmd:option('-max_count', 1000000, 'max number of data to test')
-- data loader
cmd:option('-root_path', '/n/fs/rgbd/data/scannet/public/v1/scans/', 'path to the root of the dataset')
cmd:option('-train_file', './data_list/scannet_train_list.txt', 'train file, compulsory');
cmd:option('-test_file', './data_list/scannet_test_list_small.txt', 'test file, compulsory');
-- training and testing
cmd:option('-gpuid', 1, 'gpu id')
cmd:option('-optim_state', {rho=0.95, eps=1e-6, learningRate=1e-3, learningRateMin=1e-7, momentum=0.9}, 'optim state')
cmd:option('-lr_decay', 100000, 'iterations between lr decreses')
cmd:option('-lr_decay_t', 5, 'lr decay times')
cmd:option('-nb_epoch', 20, 'number of epoches')
cmd:option('-batch_size', 1, 'batch size')
cmd:option('-pixel_means', {128, 128, 128}, 'Pixel mean values (RGB order)')
-- resume
cmd:option('-resume_training', false, 'whether resume training')
cmd:option('-saved_model_weights', '', 'path to saved model weights')
cmd:option('-saved_optim_state', '', 'path to saved model weights')
-- finetune
-- cmd:option('-finetune', false, '')
cmd:option('-finetune_model', '../pre_train_model/sync_mp.t7', '')
cmd:option('-finetune_init_lr', 1e-4, '')
-- save/print/log
cmd:option('-snapshot_iters',50000, 'Iterations between snapshots (used for saving the network)')
cmd:option('-print_iters', 20, 'Iterations between print')
cmd:option('-log_iters', 20, 'Iterations between log')
cmd:option('-log_path','./logs/','Path to be used for logging')
cmd:option('-ps', '', 'prefix: path&name to model and snapshot')
cmd:option('-verbose', false, 'show more message')
-- Parsing the command line
config = cmd:parse(arg or {})
config.colors = {{0, 0, 0}, -- black
{1, 0, 0}, -- red
{0, 1, 0}, -- green
{0, 0, 1}, -- blue
{1, 1, 0}, -- yellow
{1, 0, 1}, -- magenta
{0, 1, 1}, -- cyan
{1, 1, 1} -- white
}
return config
end
return config