Skip to content

Commit 66c55fa

Browse files
committed
Bugfix in addGradParams
Fix for when there was no gradParams optimization
1 parent 541427d commit 66c55fa

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

init.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,7 @@ end
331331

332332
local function addGradParams(net)
333333
local storages = net.__gradParamsInfo
334+
if not storages then return end
334335
local createdStorages = {}
335336
net:apply(function(m)
336337
for k, v in pairs({weight='gradWeight',bias='gradBias'}) do

0 commit comments

Comments
 (0)