X-Git-Url: https://www.fleuret.org/cgi-bin/gitweb/gitweb.cgi?p=profiler-torch.git;a=blobdiff_plain;f=test-profiler.lua;h=a78c944464b8a147894650924b34256ab8ebbba6;hp=6d98b2a22a9c6badb4ce4e3a48dda9f69d7041d5;hb=c2a852c17eb19f472762343ee8dfe3e0d1b40dbf;hpb=ac1c4d6fc4926dadc6b69fd17a54419e403530a6 diff --git a/test-profiler.lua b/test-profiler.lua index 6d98b2a..a78c944 100755 --- a/test-profiler.lua +++ b/test-profiler.lua @@ -48,9 +48,11 @@ local model = nn.Sequential() -- Decor it for profiling -profiler.decor(model) +profiler.decorate(model) print() +torch.save('model.t7', model) + -- Create the data and criterion local input = torch.Tensor(1000, 1000) @@ -86,8 +88,8 @@ end -- Print the accumulated timings --- profiler.print(model, nbSamples) -profiler.print(model) +profiler.print(model, nbSamples) +-- profiler.print(model) print() print(string.format('Total model time %.02fs', modelTime))