@@ -93,15 +93,16 @@ local function analyse(net, input, opts)
93
93
}
94
94
95
95
-- always keep track of the input
96
- opts .var = ' used' ; opts .f = math.max ; opts .notUsed = kNotUsed
96
+ -- opts.var = 'used'; opts.f = math.max; opts.notUsed = kNotUsed
97
97
-- utils.keepTrack(input, track, entry_fun, fun, opts)
98
-
98
+ if not torch . isTypeOf ( m , ' nn.Sequential ' ) then
99
99
-- always keep track of the gradOutput
100
- opts .var = ' used' ; opts .f = math.max ; opts .notUsed = kNotUsed
101
- utils .keepTrack (gradOutput , track , entry_fun , fun , opts )
100
+ opts .var = ' used' ; opts .f = math.max ; opts .notUsed = kNotUsed
101
+ utils .keepTrack (gradOutput , track , entry_fun , fun , opts )
102
102
103
- opts .var = ' defined' ; opts .f = math.min ; opts .notUsed = kNotDefined
104
- utils .keepTrack (self .gradInput , track , entry_fun , fun , opts )
103
+ opts .var = ' defined' ; opts .f = math.min ; opts .notUsed = kNotDefined
104
+ utils .keepTrack (self .gradInput , track , entry_fun , fun , opts )
105
+ end
105
106
106
107
--[[
107
108
if not m.modules then
0 commit comments