0
$\begingroup$

I have training data organised in a numpy array in which:
* column is feature - last one is the target,
* every row is one observation.

The thing is that this 2D array consists of around 15 concatenated series of data of unequal length.I would like to use it for LSTM network training. Is it possible to train LSTM network in Keras using series of unequal length? If so, how am I supposed to transform my 2D training data array into valid 3D array?

$\endgroup$

1 Answer 1

0
$\begingroup$

The standard way to treat unequal lengths is to pad them.

However, if you have very long sequences, it is often handled by splitting them into short sequences - in this case, it is up to you, what sequence length to choose.

Then you will have to decide, whether you need stateful LSTM or no, but it is out of the scope of this question.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.