X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=blobdiff_plain;f=test-profiler.lua;h=ed6a1cb695e566af881fbaa7024fc34d98e5393d;hb=9e12d0e90f4c03891fb1fa1f61870b92930f26ad;hp=71127a0a7965e03b1c47c5d5ec16f5ee19f628cb;hpb=a5f00c98459afa86205650ac4d4b474efe2d1949;p=profiler-torch.git diff --git a/test-profiler.lua b/test-profiler.lua index 71127a0..ed6a1cb 100755 --- a/test-profiler.lua +++ b/test-profiler.lua @@ -51,12 +51,11 @@ local model = nn.Sequential() ) :add(nn.Linear(1000, 100)) --- Decor it for profiling +-- Decorate it for profiling profiler.decorate(model) -print() -torch.save('model.t7', model) +-- torch.save('model.t7', model) -- Create the data and criterion @@ -93,8 +92,9 @@ end -- Print the accumulated timings --- profiler.print(model, nbSamples) -profiler.print(model) +print() +profiler.print(model, nbSamples) +-- profiler.print(model) print(string.format('Total model time %.02fs', modelTime)) print(string.format('Total data time %.02fs', dataTime))