How to integrate a trained LSTM neural network to a Simulink model?
64 views (last 30 days)
Show older comments
CARLOS VIDAL
on 6 Apr 2018
Answered: David Willingham
on 19 Oct 2021
Hi, I have trained and tested a LSTM NN on Matlab 2018a, but I`m having problem to find a way to make my trained 'net' to integrate with a Simulink model. I have tried to create a Simulink block using 'gensim(net)' but it doesn`t support LSTM. If anyone found a way around that, I'll appreciate if you could share it. Thank you,
3 Comments
Muhammad Faisal Khalid
on 16 Oct 2021
Hi, I have trained and tested a LSTM NN on Matlab but do not know how to implement trained 'net' to integrate with my Simulink model.
anybody know?
David Willingham
on 18 Oct 2021
You can use the Stateful predict, or Stateful classify to for using a trained LSTM with Simulink
Here are some links:
Accepted Answer
David Willingham
on 19 Oct 2021
You can use the Stateful predict, or Stateful classify to for using a trained LSTM with Simulink
Here are some links:
0 Comments
More Answers (2)
CARLOS VIDAL
on 10 Apr 2018
Edited: CARLOS VIDAL
on 24 May 2018
3 Comments
Jiahao CHANG
on 21 May 2021
Meeting the same error, just like Carlos said, its matrices dimentions issue. As a new of lstm, X here i think it's a matrix of time_steps*features, rather than the testing dataset you used in validation of this model.
See Also
Categories
Find more on Define Shallow Neural Network Architectures in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!