Handle Multiple Sequences with GRU/LSTM Dynamic Neural Networks

6 ビュー (過去 30 日間)
Chris P
Chris P 2020 年 8 月 28 日
編集済み: Chris P 2021 年 2 月 12 日
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 件のコメント
ahmed shahin
ahmed shahin 2020 年 12 月 7 日
did u solve this isuue please?
Chris P
Chris P 2021 年 2 月 12 日
編集済み: Chris P 2021 年 2 月 12 日
No.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeSequence and Numeric Feature Data Workflows についてさらに検索

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by