Effacer les filtres
Effacer les filtres

Handle Multiple Sequences with GRU/LSTM Dynamic Neural Networks

1 vue (au cours des 30 derniers jours)
Chris P
Chris P le 28 Août 2020
Modifié(e) : Chris P le 12 Fév 2021
I am performing system identification using neural networks. My data includes multiple subsets of data (experimental trials) rather than one long continuous dataset. Due to this, I can not simply concatenate the data to train a dynamic neural network since there will be discontinuities. I found this page which gets around this issue when designing a NARX network - https://www.mathworks.com/help/deeplearning/ug/multiple-sequences-with-dynamic-neural-networks.html
However, when I try to use this method with a LSTM or GRU design, i get the following error:
Error using DAGNetwork/predictRNN>iAssertInitialStateIsValidForPredict (line 69)
Incorrect network state. The network expects mini-batches size of 16, but was passed a mini-batch of size 1.
Error in DAGNetwork/predictRNN (line 11)
iAssertInitialStateIsValidForPredict(statefulLayers, dispatcher.MiniBatchSize)
Error in DAGNetwork/predictAndUpdateState (line 123)
[Y, finalState, predictNetwork] = this.predictRNN(X, dispatcher, ...
Error in SeriesNetwork/predictAndUpdateState (line 379)
[this.UnderlyingDAGNetwork, Y] = this.UnderlyingDAGNetwork.predictAndUpdateState(X, varargin{:});
Error in GRU_setup (line 327)
[updatedNet,yy] = predictAndUpdateState(updatedNet,v);
Note that the dimension of 16 is referring to the number of experimental trials used to train the network. I concatenated these trials using the catsamples function and got a 1x3600 cell array with each cell have a double array with dimensions 5x16. The number of inputs I have is 5 and the number of samples per test trial is 3600. Additionally, this is a single output system.
Why does the catsample method work for NARX networks but not for LSTM/GRU networks? What is a good way to organize my discontinuous data for training and execution of a LSTM/GRU network?
  2 commentaires
ahmed shahin
ahmed shahin le 7 Déc 2020
did u solve this isuue please?
Chris P
Chris P le 12 Fév 2021
Modifié(e) : Chris P le 12 Fév 2021
No.

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Sequence and Numeric Feature Data Workflows dans Help Center et File Exchange

Produits


Version

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by