Shape length error with Convolutional LSTM

Hello all,

I am new to machine learning and have tried to set up my own financial time series prediction network using the Sea Temperature Convolutional LSTM 2 example from the Deeplearning4j documentation LSTM Example.

I prepared the data exactly as described in the documentation. Feature, target and future data are available. The target data are one data point ahead of the feature data in time. The Future data is 10 data points ahead of the Target data.
My training data comprises 550 files, each with 7 columns (attributes) and exactly 50 rows (consecutive time points). The Test (Evaluation) and Future data each comprise 48 files with the same named attributes.

But no matter how I configure the network, the same error type always occurs in the net.fit() method.

With exactly the same configuration of the network as in the Sea Temperature Convolutional LSTM 2 example from the documentation (as shown in the image above), the error message looks like this:

“New shape length doesn’t match original length: [44800] vs [11200]. Original shape: [1600, 7] New Shape: [1600, 1, 7, 4]”

I would like to understand what is the reason for this.
I’m sorry that I can’t post more images at once as I’m a new user to this forum.

Best regards
Tristan

The .csv files look like this (all containing 50 rows each as I said):

The data loading and normalization code looks like this:

Correction: The Future data is 12 data points ahead of the Target data.

Hello, did you find the solution?

Huh, this seems to have slipped by somehow.

Anyway, the error message tells you exactly what the problem is: There is a reshape happening that tries to turn a [1600, 7] shaped input into a [1600, 1, 7, 4] shaped one.

Without seeing any more of the stack trace, I guess that you RnnToCnnPreProcessor is configured wrong, as that is the only place where that specific target shape may come from given the screenshots you shared.