学習済みのLSTMを​simulinkへ導​入したいです

<質問>
学習させたLSTM(trainnetwork)を用いて時系列データの予測をSimulinkで行いたいと考えています。
Simulinkを用いたLSTMの時系列データの予測手法について知ってる方がいれば教えていただきたいです。
<現状>
以下の層を持つLSTMを学習させました。
layers = [ ...
sequenceInputLayer(numFeatures)
lstmLayer(numHiddenUnits)
fullyConnectedLayer(numResponses)
regressionLayer];
次に示すMatlab Functionをsimulinkで実行したのですがエラーをはいてうまく動きませんでした。
function out = lstmnet_predict(in)
persistent mynet;
if isempty(mynet)
mynet = coder.loadDeepLearningNetwork('lstmnet.mat','net');
end
out = predict(mynet,in);
end
エラーは次の通りです。
Error generating code for network net_LSTM0. Code generation for SequenceInputLayer sequenceinput is not supported for mkldnn target. See documentation for a list of supported layers with each target.
どうやらSequenceInputLayerで問題が発生しているようなのですが、この方法は現状ではSimulinkに対応していないのでしょうか?。

 Akzeptierte Antwort

Toshinobu Shintai
Toshinobu Shintai am 21 Feb. 2021

0 Stimmen

R2020bであれば、添付ファイルのスライド1枚目の方法で実装できます。R2020a以前であれば、添付ファイルのスライド2枚目の「coder.extrinsic」を用いる方法で実装できます。

1 Kommentar

kei
kei am 21 Feb. 2021
バージョンR2020aを使用していますが、頂いた資料の2枚目を参考にプログラムを作成し無事simulink上で動作させることができました。
大変ありがとうございました。

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Deep Learning Toolbox finden Sie in Hilfe-Center und File Exchange

Produkte

Version

R2020a

Gefragt:

kei
am 20 Feb. 2021

Kommentiert:

kei
am 21 Feb. 2021

Community Treasure Hunt

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

Start Hunting!