From: Francois Fleuret Date: Mon, 5 Dec 2016 22:50:08 +0000 (+0100) Subject: Fixed a stupid and embarrassing typo. X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=commitdiff_plain;h=c2a852c17eb19f472762343ee8dfe3e0d1b40dbf;p=profiler-torch.git Fixed a stupid and embarrassing typo. --- diff --git a/profiler.lua b/profiler.lua index ad280d2..34e180b 100644 --- a/profiler.lua +++ b/profiler.lua @@ -37,7 +37,7 @@ require 'sys' profiler = {} -function profiler.decor(model, functionsToDecorate) +function profiler.decorate(model, functionsToDecorate) local functionsToDecorate = functionsToDecorate or { @@ -65,7 +65,7 @@ function profiler.decor(model, functionsToDecorate) if torch.isTypeOf(model, nn.Container) then for _, m in ipairs(model.modules) do - profiler.decor(m, functionsToDecorate) + profiler.decorate(m, functionsToDecorate) end end diff --git a/test-profiler.lua b/test-profiler.lua index 7c22576..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)