aboutsummaryrefslogtreecommitdiff
path: root/layer/sigmoid.lua
diff options
context:
space:
mode:
authorDeterminant <[email protected]>2015-06-22 19:01:29 +0800
committerDeterminant <[email protected]>2015-06-22 19:01:29 +0800
commit2497fd9e7a0fae5ee4887890d7a312e0e08a93b8 (patch)
tree382f97575bd2df9ee6abb1662b11b279fc22d72b /layer/sigmoid.lua
parent196e9b48a3541caccdffc5743001cced70667091 (diff)
major change: use luarocks to manage project
Diffstat (limited to 'layer/sigmoid.lua')
-rw-r--r--layer/sigmoid.lua31
1 files changed, 0 insertions, 31 deletions
diff --git a/layer/sigmoid.lua b/layer/sigmoid.lua
deleted file mode 100644
index dfd09eb..0000000
--- a/layer/sigmoid.lua
+++ /dev/null
@@ -1,31 +0,0 @@
-local SigmoidLayer = nerv.class("nerv.SigmoidLayer", "nerv.Layer")
-
-function SigmoidLayer:__init(id, global_conf, layer_conf)
- self.id = id
- self.gconf = global_conf
- self.dim_in = layer_conf.dim_in
- self.dim_out = layer_conf.dim_out
- self:check_dim_len(1, 1)
-end
-
-function SigmoidLayer:init()
- if self.dim_in[1] ~= self.dim_out[1] then
- nerv.error("mismatching dimensions of input and output")
- end
-end
-
-function SigmoidLayer:update(bp_err, input, output)
- -- no params, therefore do nothing
-end
-
-function SigmoidLayer:propagate(input, output)
- output[1]:sigmoid(input[1])
-end
-
-function SigmoidLayer:back_propagate(bp_err, next_bp_err, input, output)
- next_bp_err[1]:sigmoid_grad(bp_err[1], output[1])
-end
-
-function SigmoidLayer:get_params()
- return nerv.ParamRepo({})
-end