diff options
Diffstat (limited to 'layer/sigmoid.lua')
-rw-r--r-- | layer/sigmoid.lua | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/layer/sigmoid.lua b/layer/sigmoid.lua new file mode 100644 index 0000000..d69e9e3 --- /dev/null +++ b/layer/sigmoid.lua @@ -0,0 +1,14 @@ +local SigmoidLayer = nerv.class("nerv.SigmoidLayer", "nerv.Layer") + +function SigmoidLayer:__init(id, global_conf) + self.id = id + self.gconf = global_conf +end + +function SigmoidLayer:propagate(input, output) + output:sigmoid(input) +end + +function SigmoidLayer:back_propagate(next_bp_err, bp_err, input, output) + next_bp_err:sigmoid(bp_err, output) +end |