From 08a52c03a77ce13ae4f6a4deb06ab0ae274d399a Mon Sep 17 00:00:00 2001 From: Determinant Date: Tue, 2 Jun 2015 23:07:15 +0800 Subject: fix a bug: input[1] should be input[2] (since Lua arrays are 1-based) --- nn/layer_dag.lua | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'nn') 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 -- cgit v1.2.3-70-g09d2