aboutsummaryrefslogtreecommitdiff
path: root/nerv/layer
diff options
context:
space:
mode:
Diffstat (limited to 'nerv/layer')
-rw-r--r--nerv/layer/bias.lua9
-rw-r--r--nerv/layer/graph.lua6
-rw-r--r--nerv/layer/window.lua9
3 files changed, 21 insertions, 3 deletions
diff --git a/nerv/layer/bias.lua b/nerv/layer/bias.lua
index 03e310d..d3c7cdb 100644
--- a/nerv/layer/bias.lua
+++ b/nerv/layer/bias.lua
@@ -11,6 +11,9 @@ function BiasLayer:bind_params()
nerv.BiasParam,
{1, self.dim_out[1]},
nerv.Param.gen_zero)
+ if self.lconf.no_update_all then
+ self.bias.no_update = true
+ end
end
function BiasLayer:init()
@@ -34,3 +37,9 @@ end
function BiasLayer:get_params()
return nerv.ParamRepo({self.bias}, self.loc_type)
end
+
+function BiasLayer:back_propagate()
+end
+
+function BiasLayer:update()
+end
diff --git a/nerv/layer/graph.lua b/nerv/layer/graph.lua
index 5b5d4c7..f8462f7 100644
--- a/nerv/layer/graph.lua
+++ b/nerv/layer/graph.lua
@@ -17,7 +17,7 @@ local GraphLayer = nerv.class('nerv.GraphLayer', 'nerv.Layer')
-- @param layer_conf a table providing with settings dedicated for the layer,
-- the following fields should be specified:
--
--- * `lrepo`: the layer repo that should be used to find the sub-level layers
+-- * `layer_repo`: the layer repo that should be used to find the sub-level layers
-- * `connections`: an array of 3-tuples describing the connections of
-- sub-level layers, the structure is as follow:
--
@@ -33,8 +33,8 @@ local GraphLayer = nerv.class('nerv.GraphLayer', 'nerv.Layer')
--
-- <layer_id>[<port_idx>]
-- where the `<layer_id>` is a string that identifies the layer in
--- `lconf.lrepo`, and `<port_id>` is the input or output port index when used
--- in the first or second port specification respectively.
+-- `layer_conf.layer_repo`, and `<port_id>` is the input or output port index
+-- when used in the first or second port specification respectively.
--
-- The third element in the tuple is an integer specifying the time delay of
-- this connection. In most cases, it will be simply zero. But for an
diff --git a/nerv/layer/window.lua b/nerv/layer/window.lua
index 729ab58..fb74b14 100644
--- a/nerv/layer/window.lua
+++ b/nerv/layer/window.lua
@@ -11,6 +11,9 @@ function WindowLayer:bind_params()
nerv.BiasParam,
{1, self.dim_out[1]},
nerv.Param.gen_zero)
+ if self.lconf.no_update_all then
+ self.window.no_update = true
+ end
end
function WindowLayer:init()
@@ -34,3 +37,9 @@ end
function WindowLayer:get_params()
return nerv.ParamRepo({self.window}, self.loc_type)
end
+
+function WindowLayer:back_propagate()
+end
+
+function WindowLayer:update()
+end