I'm trying to build a recurrent neural network using Keras. I'm using as base the discussion presented here.
However, in the solution proposed on the original discussion, as far as I understand, there is no concept of an "episode". Let me explain what I mean by that.
Imagine you have 6 instances x1,x2,x3,x4,x5,x6. Given a recurrent window of size 3, the first output is at x3. I'm referring it as y3. So, the input-output pairs without the episode concept look like that:
- [x1, x2, x3], [y3]
- [x2, x3, x4], [y4]
- [x3, x4, x5], [y5]
- [x4, x5, x6], [y6]
My data, however, have well defined boundaries. I would have two episodes in the example, so the training pairs look like that:
- [x1, x2, x3], [y3]
- [x4, x5, x6], [y6]
My question: is it possible to do this in Keras?
How should I keep my input-output pair organization? The network should produce no prediction (no output) for all inputs but x3 and x6.
PS: I may use LSTM or classical recurrence. In the case there is a solution using LSTM, I would like to be able to reset the memory after each episode.
Thanks in advance.