diff options
author | cloudygoose <[email protected]> | 2015-06-02 11:14:18 +0800 |
---|---|---|
committer | cloudygoose <[email protected]> | 2015-06-02 11:14:18 +0800 |
commit | 2bb2076fe12deb3bf6a38bd2e192dca06c7736e0 (patch) | |
tree | 8d0ae95e5474eb70d86a000ccc0b38df017af3e0 /layer/affine.lua | |
parent | 5e7fcdf4e5be450927764254d492d87349e4114e (diff) | |
parent | d0a3e02d1a25a681ac78fd66aedf63f96636f6d2 (diff) |
...
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'layer/affine.lua')
-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 |