How to use trainNetwork with varying lengths of inputs and outputs?
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hi all. I have a problem using trainNetwork for a seq-to-seq regression problem. The error it gives is "Sequence responses must have the same sequence length as the corresponding predictors". I have used a sliding window to take 5 previous timesteps (with multiple features concatenated into a cell) and predict a single feature 2 timesteps into the future. It works when I try to predict 5 timesteps into the future but won't work if the Y_Train cell has comma separated row vectors with any other number of entries within the cell. Is there some way to use the LSTM layers to do this type of forecasting? I hope the pictures of the data helps .
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/318853/image.png)
0 comentarios
Respuestas (1)
Divya Gaddipati
el 25 de Jun. de 2020
From the error, I'm guessing the size of the output from the last layer of your network is not same as the size of YTrain, which is causing the error. Modify the last layer to output responses of size(Ytrain).
For more information on defining networks for sequence-to-sequence regression type problems, you can refer to the following link:
0 comentarios
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!