diff options
Diffstat (limited to 'nerv/nn/param_repo.lua')
-rw-r--r-- | nerv/nn/param_repo.lua | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/nerv/nn/param_repo.lua b/nerv/nn/param_repo.lua index ab971ba..6d52691 100644 --- a/nerv/nn/param_repo.lua +++ b/nerv/nn/param_repo.lua @@ -67,6 +67,14 @@ function ParamRepo:export(param_file, pids) cf:close() end +function ParamRepo:has_param(pid) + if self.params[pid] ~= nil then + return true + else + return false + end +end + function ParamRepo:get_param(pid) local p = self.params[pid] if p == nil then |