Fully connected neural network invalid training data: Responses must be categorical sequences
Show older comments
Hello
I am trying to create a Fully Connected Neural Network to classify feature data. I have input data as a 4000x2 cell containing in column 1 the input features as 12x5 double (12 features with 5 values for each), and in column 2 the response lables (0 or 1). Before I input data to the network I arrange column 1 and 2 in seperate variables as a x = 4000x1 cell (with features) and y = 4000x1 categorical (with responses). However, when I run trainNetwork I get the following error message:
Error using trainNetwork (line 165)
Invalid training data. If the network outputs sequences, then the responses must be a cell array of categorical sequences, or
a categorical sequence.
I arrange and convert resonses from the input cell (4000x2) to a categorical by using categorical :
yTemp = inputDataCell(1:4000,2);
y = categorical(cell2mat(yTemp));
Question: How is my cell array of categorical responses not a categorical sequence and how do I make it so?
Accepted Answer
More Answers (0)
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!