-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathrun.lua
33 lines (29 loc) · 1.16 KB
/
run.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
local pipDir = paths.concat('pipelines', OPT.pipeline) -- customized pipline
local stdPipDir = paths.concat('pipelines', 'standard') -- standard pipeline
-- load in functions for training, testing and evaluation
if OPT.train then
if not paths.filep(paths.concat(pipDir, 'train.lua')) then
print("it seems you don't have customized train.lua, import standard/train.lua")
paths.dofile(paths.concat(stdPipDir, 'train.lua'))
else
paths.dofile(paths.concat(pipDir, 'train.lua'))
end
end
if OPT.eval then
if not paths.filep(paths.concat(pipDir, 'eval.lua')) then
print("it seems you don't have customized eval.lua, import standard/eval.lua")
paths.dofile(paths.concat(stdPipDir, 'eval.lua'))
else
paths.dofile(paths.concat(pipDir, 'eval.lua'))
end
end
if OPT.test then
if not paths.filep(paths.concat(pipDir, 'test.lua')) then
print("it seems you don't have customized test.lua, import standard/test.lua")
paths.dofile(paths.concat(stdPipDir, 'test.lua'))
else
paths.dofile(paths.concat(pipDir, 'test.lua'))
end
end
-- run the pipeline
paths.dofile(paths.concat(pipDir, 'pipeline.lua'))