My data and responses have the same sequence length although the error says otherwise.

조회 수: 1 (최근 30일)
My data is a 360x1 cell filled with 3x769 arrays
and my response data is a cell array of categorical sequences that are 1x769
I am able to make this data go through the sample sequence-sequence network that Matlab has in the deep network designer
Although using my network it provides this error
Error using trainNetwork (line 184)
Invalid training data. Sequence responses must have the same sequence length as the corresponding predictors.
  댓글 수: 5
Javier Castillo
Javier Castillo 2021년 10월 20일
Hi Sahil,
I'm still confused on how to fix this error since the error it gives out is about the sequence length of the response array when it has the same length as the predictor array. When testing it out on other networks like the sample sequence to sequence LSTM Matlab has in the DeepNetworkDesigner toolbox, my data works and the training procedure starts. How would I be able to run my data through my CNN?
Sahil Jain
Sahil Jain 2021년 10월 21일
From my understanding, the issue is that for every 3x769 input, your network should output a 5x769 array. However, your network's output is a vector of length 5. This is because you are passing the entire 3x769 sequence as one image. The reason your data works with the sample sequence-to-sequence LSTM is because in that network, you are passing only a vector of length 3 to the network for every time step and therefore, it is able to generate an output vector of length 5 for all 769 time steps. Have a look at the difference between the parameters of the "sequenceInputLayer" in the sample network and your network.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

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