From c2a852c17eb19f472762343ee8dfe3e0d1b40dbf Mon Sep 17 00:00:00 2001 From: Francois Fleuret Date: Mon, 5 Dec 2016 23:50:08 +0100 Subject: [PATCH] Fixed a stupid and embarrassing typo. --- profiler.lua | 4 ++-- test-profiler.lua | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) 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) -- 2.20.1