Invalid training data in LSTM

1 次查看(过去 30 天)
I have given the following dimensions data for sequence to label classification using LSTM.....
xtrain = 56724 x 1 cell (each cell is having 1 x 2560 double)
ytrain = 56724 x 1 categorical
I am getting the following error:
Invalid training data. Predictors must be a N-by-1 cell array of sequences, where N is the number of
sequences. All sequences must have the same feature dimension and at least one time step.
Can anyone solve my issue.

采纳的回答

Harsha Priya Daggubati
Hi,
The proper input format to train a LSTM Network should be as follows,
XTrain = N x 1 cell
YTrain = N x 1 , where N denotes the Number of Sequences/Training Examples.
Each cell in Training set can have variable number of columns, but a definite set of rows. It implies each cell is of the form K x L, where K is the number of input features and L is the input data for that feature.
Here in your case, I doubt there is an issue with your XTrain cell. Try modifying your XTrain to match the input format specified above.
Hope this helps!
  1 个评论
swetha annangi
swetha annangi 2020-1-28
Thank you Harsha. I verified my XTrain cells....there is a mistake in few cells. i rectified it.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Deep Learning Toolbox 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by