I'm trying to classify a vector of 0s and 1s of arbitrary length. For that I'm sliding a window over the vector and use the subvector as input for a deep neural network. I would now like to improve my prediction by taking the last two or three predictions into account (and maybe the next few as well; see figure below).
I'm aware that this is a classic job for a RNN, however I'm not sure how to implement it. I am using the keras library for python and struggle with the keras specific RNN layers. Which shape should my input data have? Does the layer need to be stateful? What batch-size do I need?