diff options
author | Determinant <[email protected]> | 2015-05-27 12:02:44 +0800 |
---|---|---|
committer | Determinant <[email protected]> | 2015-05-27 12:02:44 +0800 |
commit | 44752a8175c54effd0c901333a7eb4cc71dd6810 (patch) | |
tree | 9794cfff9382e510298c729bb70b2cdd1ece23f7 /layer/sigmoid.lua | |
parent | f8543464c13584e39bfacee694ee1ed80ac121f4 (diff) |
add implementation for sigmoid layer (not tested)
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 |