Error using trainNetwork (line 154)
Invalid training data. For a recurrent layer with output mode 'last', responses must be a categorical column vector.
Error in Trails (line 71)
net = trainNetwork(XTrain,YTrain,layers,options);
Caused by:
Error using nnet.internal.cnn.util.NetworkDataValidator/assertOutputModeCorrespondsToDataForClassification (line 382)
Invalid training data. For a recurrent layer with output mode 'last', responses must be a categorical column vector.
I will be thankful to u if ur solution resolves this problem.