Implementing Truncated Backpropagation Through Time

This post [Truncated backprop data clarification] may help you.