LSTM sequence-to-one regression
3 ビュー (過去 30 日間)
古いコメントを表示
I'm trying to the use sequence-to-one regression framework using OutputMode = 'last' with no success. I have a time series dataset with 10 features to predict 3 targets, with a total of 30 sequence/target rows. My training data is formatted such that XTrain is a {30x1} cell, where each cell is [10 x L] and L represents the varying sequence length. YTrain is [30 x 3], representing the three targets for each sequence.
The code runs fine, but the LSTM predicts YPred = [30 x 3] and each column has the same value for all 30 sequences! Is there some setting I'm missing, or can anyone point me to an example where this structure was successfully used in MATLAB?
0 件のコメント
回答 (1 件)
Asvin Kumar
2021 年 5 月 11 日
If you could share the code that you've written so far, the community will be able to help you better.
If I still had to guess, I would say this is because YTrain is not a cell array of size 30x1 similar to XTrain. Each cell of YTrain would then have an array of size 3x1.
Also, ensure that the 'OutputMode' property is set to 'last'. You can set the 'NumHiddenUnits' to 3 or you can set it to a larger size as required and then follow up the lstmLayer with a fullyConnectedLayer whose outputSize is 3 similar to this example on Japanese vowel classification. The output size of the lstmLayer will be 'NumHiddenUnits' as mentioned here. This will be the input size to the fullyConnectedLayer.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Consumer Credit Risk についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!