X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=blobdiff_plain;f=test-profiler.lua;h=ed6a1cb695e566af881fbaa7024fc34d98e5393d;hb=9e12d0e90f4c03891fb1fa1f61870b92930f26ad;hp=aa6e800f39b2f1adbf2d1931cf237e243a68f7a9;hpb=78ce9a217ef066c8f01b1531c27c6ef38c45ece1;p=profiler-torch.git diff --git a/test-profiler.lua b/test-profiler.lua index aa6e800..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,8 @@ end -- Print the accumulated timings --- profiler.color = false -profiler.print(model, nbSamples, modelTime) +print() +profiler.print(model, nbSamples) -- profiler.print(model) print(string.format('Total model time %.02fs', modelTime))