diff options
author | Determinant <[email protected]> | 2016-04-18 12:38:25 +0800 |
---|---|---|
committer | Determinant <[email protected]> | 2016-04-18 12:38:25 +0800 |
commit | c73636ba680cdb5b57602a1876a75c110b43d426 (patch) | |
tree | 25a36588f066bfb850c5d0a81c5c40f01b8def56 /nerv/layer/init.lua | |
parent | b15dbc05b08008327b88a62d7f90ef9250182e9b (diff) |
support SeqBuffer decoding; fix bugs in finding paramsalpha-4
Diffstat (limited to 'nerv/layer/init.lua')
-rw-r--r-- | nerv/layer/init.lua | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/nerv/layer/init.lua b/nerv/layer/init.lua index c5b7657..3a6cbcd 100644 --- a/nerv/layer/init.lua +++ b/nerv/layer/init.lua @@ -114,12 +114,13 @@ function Layer:find_param(plist, lconf, gconf, p_type, p_dim, p_gen) if lconf.pr:has_param(pid) then return lconf.pr:get_param(pid) end + pid = self.id .. '_' .. pname + if lconf.pr:has_param(pid) then + nerv.info("param id for [%s] of layer [%s] is generated automatically.", plist[1], self.id) + return lconf.pr:get_param(pid) + end end pid = self.id .. '_' .. plist[1] - if lconf.pr:has_param(pid) then - nerv.info("param id for [%s] of layer [%s] is generated automatically.", plist[1], self.id) - return lconf.pr:get_param(pid) - end nerv.info("param id for [%s] of layer [%s] is not found in the specified param repo, " .. "switch to auto-generate", plist_str, self.id) local p = p_type(pid, gconf) |