aboutsummaryrefslogtreecommitdiff
path: root/layer/sigmoid.lua
diff options
context:
space:
mode:
authorDeterminant <[email protected]>2015-05-28 14:31:31 +0800
committerDeterminant <[email protected]>2015-05-28 14:31:31 +0800
commitc13115662e739b434f1071eb623a41a39d8b4985 (patch)
tree9368b5706ef9ddb3002369d3193f525ad9814201 /layer/sigmoid.lua
parent382106f36025f76e2f5d04c44b9ccb0998cf40cf (diff)
should support multiple input/output for layers
Diffstat (limited to 'layer/sigmoid.lua')
-rw-r--r--layer/sigmoid.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/layer/sigmoid.lua b/layer/sigmoid.lua
index d0a87c0..41a6ef7 100644
--- a/layer/sigmoid.lua
+++ b/layer/sigmoid.lua
@@ -10,9 +10,9 @@ function SigmoidLayer:update(bp_err, input, output)
end
function SigmoidLayer:propagate(input, output)
- output:sigmoid(input)
+ output[0]:sigmoid(input[0])
end
function SigmoidLayer:back_propagate(next_bp_err, bp_err, input, output)
- next_bp_err:sigmoid_grad(bp_err, output)
+ next_bp_err[0]:sigmoid_grad(bp_err[0], output[0])
end