diff options
Diffstat (limited to 'nerv/examples/lmptb/rnn')
-rw-r--r-- | nerv/examples/lmptb/rnn/tnn.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/nerv/examples/lmptb/rnn/tnn.lua b/nerv/examples/lmptb/rnn/tnn.lua index 8c3963c..f470190 100644 --- a/nerv/examples/lmptb/rnn/tnn.lua +++ b/nerv/examples/lmptb/rnn/tnn.lua @@ -379,7 +379,7 @@ function TNN:propagate_dfs(ref, t) end end end - ref.layer:propagate(ref.inputs_m[t], ref.outputs_m[t]) --propagate! + ref.layer:propagate(ref.inputs_m[t], ref.outputs_m[t], t) --propagate! if (bit.bor(self.feeds_now.flagsPack_now[t], bit.bor(nerv.TNN.FC.SEQ_START, nerv.TNN.FC.SEQ_END)) > 0) then --restore cross-border history for i = 1, self.batch_size do local seq_start = bit.bor(self.feeds_now.flags_now[t][i], nerv.TNN.FC.SEQ_START) @@ -495,10 +495,10 @@ function TNN:backpropagate_dfs(ref, t, do_update) end end if (do_update == false) then - ref.layer:back_propagate(ref.err_inputs_m[t], ref.err_outputs_m[t], ref.inputs_m[t], ref.outputs_m[t]) + ref.layer:back_propagate(ref.err_inputs_m[t], ref.err_outputs_m[t], ref.inputs_m[t], ref.outputs_m[t], t) else --print(ref.err_inputs_m[t][1]) - ref.layer:update(ref.err_inputs_m[t], ref.inputs_m[t], ref.outputs_m[t]) + ref.layer:update(ref.err_inputs_m[t], ref.inputs_m[t], ref.outputs_m[t], t) end for i = 1, #ref.dim_in do if (ref.err_outputs_b[t][i] == true) then |