X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=blobdiff_plain;f=test-profiler.lua;h=6d79e91ff42057fabf63be9938799e3012a87db3;hb=68a13164487148de14df6667da34ce2b73666ecd;hp=aa6e800f39b2f1adbf2d1931cf237e243a68f7a9;hpb=78ce9a217ef066c8f01b1531c27c6ef38c45ece1;p=profiler-torch.git diff --git a/test-profiler.lua b/test-profiler.lua index aa6e800..6d79e91 100755 --- a/test-profiler.lua +++ b/test-profiler.lua @@ -51,12 +51,9 @@ 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) -- Create the data and criterion @@ -93,8 +90,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))