Invalid training data. Predictors and responses must have the same number of observations.
Mostrar comentarios más antiguos
I wan to train a LSTM.
But I get Error:
Error using trainNetwork (line 191)
Invalid training data. Predictors and responses must have the same number of observations.
layers = [ ...
sequenceInputLayer(6)
lstmLayer(120,'OutputMode','last')
fullyConnectedLayer(2)
softmaxLayer
classificationLayer];
options = trainingOptions('adam', ...
'MaxEpochs',20, ...
'MiniBatchSize',32, ...
'GradientThreshold',1, ...
'InitialLearnRate',0.005, ...
'Shuffle','every-epoch', ...
'Verbose',0, ...
'Plots','training-progress');
net = trainNetwork(XTrain, YTrain, layers, options);



Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Built-In Training en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!