0

I'm facing an issue similar to one pointed out in this question: Keras misinterprets training data shape

I have data points of varying length. I have grouped them into groups of small, medium and large by padding them to nearest range i.e. small, medium and large. So now I have 3 groups having different length data points between the groups but all data points within a group have same length. However, the problem is that each group has different number of data points i.e. size of the group.

Can you please let me know how I should train an LSTM in such situation?

Should I use fit_generator(). If so, I'm not getting how should I create a generator object over these 3 groups i.e. nd-numpy arrays?

Also, I'm confused as to how the batch_size, steps_per_epoch will work in this context where each variable length group has different size (i.e. different number of data rows/sequences)

Thank you

  • please provide a [MCVE] so that people can see what you are working with and may be able to find your problem – Hippolippo Feb 16 '20 at 03:14
  • You need to combine all the data into a single group by considering the appropriate method to fix the length of samples. If you still want to continue with multiple groups it will be helpful if you share some sample code to get insight on the problem statement. – Sachin Prasad H S Apr 19 '20 at 17:32

0 Answers0