diff options
author | Determinant <[email protected]> | 2015-06-01 17:37:13 +0800 |
---|---|---|
committer | Determinant <[email protected]> | 2015-06-01 17:37:13 +0800 |
commit | a309ce5e33b22030bcac348c63576187676abee3 (patch) | |
tree | b43714a53b8f78a12a52cb0ee88c6ed7be786cac /layer | |
parent | ab12a9583bdd39884fde9bc2444e6fd1bc5f518e (diff) |
add expand_frm, rearrange_frm, scale_row
Diffstat (limited to 'layer')
-rw-r--r-- | layer/affine.lua | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/layer/affine.lua b/layer/affine.lua index d88813e..573b98d 100644 --- a/layer/affine.lua +++ b/layer/affine.lua @@ -1,13 +1,14 @@ -local LinearTransParam = nerv.class('nerv.LinearTransParam', 'nerv.Param') -local BiasParam = nerv.class('nerv.BiasParam', 'nerv.LinearTransParam') +local MatrixParam = nerv.class('nerv.MatrixParam', 'nerv.Param') +local LinearTransParam = nerv.class('nerv.LinearTransParam', 'nerv.MatrixParam') +local BiasParam = nerv.class('nerv.BiasParam', 'nerv.MatrixParam') local AffineLayer = nerv.class('nerv.AffineLayer', 'nerv.Layer') -function LinearTransParam:read(pcdata) +function MatrixParam:read(pcdata) self.trans = self.gconf.mat_type.new_from_host( nerv.MMatrixFloat.load(pcdata)) end -function LinearTransParam:write(pfhandle) +function MatrixParam:write(pfhandle) self.trans:new_to_host():save(pfhandle) end |