Invalid training data in LSTM
1 view (last 30 days)
Show older comments
swetha annangi
on 24 Jan 2020
Commented: swetha annangi
on 28 Jan 2020
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.
0 Comments
Accepted Answer
Harsha Priya Daggubati
on 27 Jan 2020
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!
More Answers (0)
See Also
Categories
Find more on Deep Learning Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!