aboutsummaryrefslogtreecommitdiff
path: root/layer
diff options
context:
space:
mode:
authorDeterminant <[email protected]>2015-06-01 17:37:13 +0800
committerDeterminant <[email protected]>2015-06-01 17:37:13 +0800
commita309ce5e33b22030bcac348c63576187676abee3 (patch)
treeb43714a53b8f78a12a52cb0ee88c6ed7be786cac /layer
parentab12a9583bdd39884fde9bc2444e6fd1bc5f518e (diff)
add expand_frm, rearrange_frm, scale_row
Diffstat (limited to 'layer')
-rw-r--r--layer/affine.lua9
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