필터 지우기
필터 지우기

How to use trainNetwork with varying lengths of inputs and outputs?

조회 수: 8 (최근 30일)
Renita Raidoo
Renita Raidoo 2020년 6월 19일
답변: Divya Gaddipati 2020년 6월 25일
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 .

답변 (1개)

Divya Gaddipati
Divya Gaddipati 2020년 6월 25일
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:

카테고리

Help CenterFile Exchange에서 Image Data Workflows에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by