/
baseline.lua
39 lines (31 loc) · 1.36 KB
/
baseline.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
local bench_utils = require 'bench_utils'
-- Output file
local output_path = 'baseline.md'
local output = io.open(output_path, "w")
output:write("## Results\n")
output:write("This file contains the results for the tests on the GTSRB dataset.\n\n")
output:write("| Command line arguments | accuracy on validation set |\n")
output:write("| --------------------- | ----- |\n")
print("Running best result with full dataset.")
local params = {}
table.insert(params, {'--val', {true}}) -- run tests on the validation set
table.insert(params, {'-n -1', {true}})
bench_utils.run_test(params, output)
print("Running main tests.")
params = {}
table.insert(params, {'--val', {true}}) -- run tests on the validation set
table.insert(params, {'--cnn ', {false, "38,64,100"}})
table.insert(params, {'--ms', {false, true}})
table.insert(params, {'--no_lnorm', {false, true}})
table.insert(params, {'--no_cnorm', {false, true}})
table.insert(params, {'--mom ', {false, '0.9'}})
bench_utils.run_test(params, output)
print("Running idsia net tests.")
params = {}
table.insert(params, {'--val', {true}}) -- run tests on the validation set
table.insert(params, {'--net ', {'idsia_net.lua'}})
table.insert(params, {'--cnn ', {"100,150,250,300", "150,200,300,350"}})
bench_utils.run_test(params, output)
output:write('\n\n')
output:write('This file is generated by the `baseline.lua` script.\n')
output:close()