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=d17f320f27c43bb69e9298121238a0e1ea126933;hb=c2a852c17eb19f472762343ee8dfe3e0d1b40dbf;hpb=e05c72d75cf6c53887834d3c314a8ba6db6b56b3 diff --git a/test-profiler.lua b/test-profiler.lua index d17f320..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) @@ -87,6 +89,7 @@ end -- Print the accumulated timings profiler.print(model, nbSamples) +-- profiler.print(model) print() print(string.format('Total model time %.02fs', modelTime))