Could anyone please help me with an example of LSTM network matlab code.
1 次查看(过去 30 天)
显示 更早的评论
numFeatures = 12;
numHiddenUnits1 = 125;
numHiddenUnits2 = 100;
numClasses = 9;
layers = [ ...
sequenceInputLayer(numFeatures)
lstmLayer(numHiddenUnits1,'OutputMode','sequence')
dropoutLayer(0.2)
lstmLayer(numHiddenUnits2,'OutputMode','last')
dropoutLayer(0.2)
fullyConnectedLayer(numClasses)
softmaxLayer
classificationLayer];
1 个评论
Steven Lord
2021-6-11
That appears to be the last example in the "Deeper LSTM Networks" subsection on this documentation page. Since you've found that page it's not clear what type of help you're looking for. Please explain what you want in more detail.
回答(3 个)
Steven Lord
2021-6-11
One of the "Related Topics" listed at the end of the documentation page to which I linked in my comment on the question is "Time Series Forecasting Using Deep Learning". Is the process described on that page what you mean by "perform time series using LSTM"? If you don't want to use the time series data to forecast the values of your series at future times, what do you want to do?
0 个评论
jaah navi
2021-6-11
1 个评论
Steven Lord
2021-6-11
Please don't post comments responding to an answer as answers themselves. Post them as comments, like I did here.
You did not mention in your original message that you were receiving an error.
Do you have Deep Learning Toolbox installed? You can check the output of the ver function to determine this. Since sequenceInputLayer is part of that product if you don't have the toolbox installed and licensed you will not be able to use it.
which sequenceInputLayer
Which release of MATLAB are you using? The ver function will also show you this.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Sequence and Numeric Feature Data Workflows 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!