I am new to Keras and just started working on some examples. I am dealing with the following problem: I have 4032 samples and use about 650 of them as for the fit or basically the training state and then use the rest for testing the model. The problem is that I keep getting the following error:
Exception: In a stateful network, you should only pass inputs with a number of samples that can be divided by the batch size.
I understand why I am getting this error, my question is, what if the size of my data is not divisible by batch_size
? I used to work with Deeplearning4j LSTM and did not have to deal with this problem. Is there anyway to get around with this?
Thanks
stateful=False
then this would no longer be an issue? Btw, if stateful is False, is the model still an LSTM? I am using the network from one of the examples (stateful_lstm.py). Sorry if my questions are simple but I am a newbie :) Thanks – Demitria