aboutsummaryrefslogtreecommitdiff
path: root/nn/layer_dag.lua
diff options
context:
space:
mode:
authorDeterminant <[email protected]>2015-06-02 23:07:15 +0800
committerDeterminant <[email protected]>2015-06-02 23:07:15 +0800
commit08a52c03a77ce13ae4f6a4deb06ab0ae274d399a (patch)
tree1cf0ac8c7d05a83c9a7246d6b6c56eb113124385 /nn/layer_dag.lua
parent74d9e9e7371c80394698fb9805cbf0cbde67a8f3 (diff)
fix a bug: input[1] should be input[2] (since Lua arrays are 1-based)
Diffstat (limited to 'nn/layer_dag.lua')
-rw-r--r--nn/layer_dag.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/nn/layer_dag.lua b/nn/layer_dag.lua
index 8ea28a0..1ab18fa 100644
--- a/nn/layer_dag.lua
+++ b/nn/layer_dag.lua
@@ -219,6 +219,10 @@ function nerv.DAGLayer:back_propagate(next_bp_err, bp_err, input, output)
self:set_outputs(output)
for i = #self.queue, 1, -1 do
local ref = self.queue[i]
+ -- print(ref.layer.id)
ref.layer:back_propagate(ref.err_outputs, ref.err_inputs, ref.inputs, ref.outputs)
+ -- if #ref.err_outputs > 0 then
+ -- print(ref.err_outputs[1])
+ -- end
end
end