How to use LSTM based trained Recurrent Neural Network in Simulink?

11 ビュー (過去 30 日間)
Muza Iqbal
Muza Iqbal 2019 年 9 月 2 日
回答済み: Arkadiy Turevskiy 2021 年 10 月 18 日
I have trained recurrent neural network and using "Predict" command it gives the required output for the trained input set but i am facing error on using it in "user defined function" in simulink, importing net.mat file via "from work space" block or "load ('net.mat');" command.
ERROR:
Unsupported input format for From Workspace block 'SHAPFpqFinal/RNN/From Workspace'. Available formats are double non-complex matrix, a structure with or without time, or a structure with MATLAB timeseries as leaf nodes. All formats require the data to be finite (not Inf or NaN).
Component:Simulink | Category:Block error
Kindly do guide me in this regard. Thanks in advance....
  2 件のコメント
Chengshi  Wang
Chengshi Wang 2020 年 1 月 22 日
Did you found out the solution? I was wondering the same problem. Thanks.
Rogith balaji Venkateswaran
Rogith balaji Venkateswaran 2020 年 8 月 21 日
+1. Thanks

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

回答 (1 件)

Arkadiy Turevskiy
Arkadiy Turevskiy 2021 年 10 月 18 日
Hi,
We added a library of blocks to integrate deep learning networks into Simulink models starting with 20b. Support for LSTM and other recurrent networks was added in 21a.
To bring trained LSTM into a Simulink model, please use Stateful Classify block. In the block dialog specify .MAT file with your LSTM network.
See this example to help you.
All deep learning blocks are decribed here.
HTH.
Arkadiy

カテゴリ

Help Center および File ExchangeDeep Learning with Simulink についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by