X-Git-Url: https://www.fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=blobdiff_plain;f=test-profiler.lua;h=6d79e91ff42057fabf63be9938799e3012a87db3;hb=8d4482f638759e052f858396825ca617a29cdafe;hp=71127a0a7965e03b1c47c5d5ec16f5ee19f628cb;hpb=a5f00c98459afa86205650ac4d4b474efe2d1949;p=profiler-torch.git diff --git a/test-profiler.lua b/test-profiler.lua index 71127a0..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,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))