projects
/
profiler-torch.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e927faa
)
Highlight the non-containers with '*' in profiler.print() to ease the reading.
author
Francois Fleuret
<francois@fleuret.org>
Tue, 6 Dec 2016 08:15:27 +0000
(09:15 +0100)
committer
Francois Fleuret
<francois@fleuret.org>
Tue, 6 Dec 2016 08:15:27 +0000
(09:15 +0100)
profiler.lua
patch
|
blob
|
history
diff --git
a/profiler.lua
b/profiler.lua
index
4e45787
..
3bbccaf
100644
(file)
--- a/
profiler.lua
+++ b/
profiler.lua
@@
-82,8
+82,15
@@
end
function profiler.print(model, nbSamples, totalTime, indent)
local indent = indent or ''
+ local hint
- print(string.format('%s* %s', indent, model.__typename))
+ if torch.isTypeOf(model, nn.Container) then
+ hint = ' '
+ else
+ hint = '*'
+ end
+
+ print(string.format('%s%s %s', indent, hint, model.__typename))
for l, t in pairs(model.accTime) do
local s = string.format('%s %s %.02fs', indent, l, t)