Skip to content

Commit

Permalink
Fix a bug that the time benchmark does not works when method=user and…
Browse files Browse the repository at this point in the history
… scale=1
  • Loading branch information
nagadomi committed Jul 22, 2016
1 parent 962bdcf commit 3add726
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tools/benchmark.lua
Original file line number Diff line number Diff line change
Expand Up @@ -320,9 +320,13 @@ local function benchmark(opt, x, model1, model2)
model2_output = image_f(model2, input, opt.crop_size, opt.batch_size)
end
end
t = sys.clock()
model1_output = image_f(model1, input, opt.crop_size, opt.batch_size)
model1_time = model1_time + (sys.clock() - t)
if model2 then
t = sys.clock()
model2_output = image_f(model2, input, opt.crop_size, opt.batch_size)
model2_time = model2_time + (sys.clock() - t)
end
end
end
Expand Down

0 comments on commit 3add726

Please sign in to comment.