Explorar o código

merge from dev

nagadomi %!s(int64=9) %!d(string=hai) anos
pai
achega
2e6de28281
Modificáronse 1 ficheiros con 11 adicións e 3 borrados
  1. 11 3
      tools/benchmark.lua

+ 11 - 3
tools/benchmark.lua

@@ -32,6 +32,7 @@ cmd:option("-output_dir", "./", 'output directroy')
 cmd:option("-show_progress", 1, 'show progressbar')
 cmd:option("-baseline_filter", "Catrom", 'baseline interpolation (Box|Lanczos|Catrom(Bicubic))')
 cmd:option("-save_info", 0, 'save score and parameters to benchmark.txt')
+cmd:option("-save_all", 0, 'group -save_info, -save_image and -save_baseline_image option')
 
 local function to_bool(settings, name)
    if settings[name] == 1 then
@@ -47,9 +48,16 @@ if cudnn then
    cudnn.benchmark = false
 end
 to_bool(opt, "gamma_correction")
-to_bool(opt, "save_image")
-to_bool(opt, "save_info")
-to_bool(opt, "save_baseline_image")
+to_bool(opt, "save_all")
+if opt.save_all then
+   opt.save_image = true
+   opt.save_info = true
+   opt.save_baseline_image = true
+else
+   to_bool(opt, "save_image")
+   to_bool(opt, "save_info")
+   to_bool(opt, "save_baseline_image")
+end
 to_bool(opt, "show_progress")
 
 local function rgb2y_matlab(x)