Implementing Truncated Backpropagation Through Time

That’s pretty much what I want to do, indeed. So far I just detach the variables inside that if statement, so I achieve the effect of having k1 = k2.

Maybe I should have put some pseudocode from the very beginning. Sorry about that.