X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=blobdiff_plain;f=test-profiler.lua;h=6d79e91ff42057fabf63be9938799e3012a87db3;hb=8d4482f638759e052f858396825ca617a29cdafe;hp=18677ec0f0bf40c5d651ce969d85779e0033d124;hpb=b8c7166b9123735e8226d34b717d3cbc2dc1fa02;p=profiler-torch.git diff --git a/test-profiler.lua b/test-profiler.lua index 18677ec..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,9 +90,9 @@ end -- Print the accumulated timings -profiler.print(model, nbSamples, modelTime) +print() +profiler.print(model, nbSamples) -- profiler.print(model) -print() print(string.format('Total model time %.02fs', modelTime)) print(string.format('Total data time %.02fs', dataTime))