MATLAB matファイル 保存方法
6 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Ryotaro Torikai
el 20 de Oct. de 2023
Respondida: Jaynik
el 23 de Oct. de 2023
MATLABのSimulinkでstateful Predict を使用するために、mファイル上で実行したLSTMをmatファイルとして保存したいです。
どのようにすればいいのか詳しい方、よろしくお願いいたします。
0 comentarios
Respuesta aceptada
Jaynik
el 23 de Oct. de 2023
Hi Ryotaro,
私は日本語がネイティブではないので、この質問に英語で答えてみます。 ご理解のほどよろしくお願いいたします。
I understand that you are trying to save a ‘LSTM’ model to a ‘mat’ file for using it with the ‘Stateful Predict’ block in Simulink. Once you have finished training your model using the ‘trainNetwork’ function, you can directly save your model using the 'save' function. Following is a sample code to perform the given task:
net = trainNetwork(features,responses,layers,options);
save('lstm_model.mat', 'net'); % Saves the model as 'mat' file
loadedModel = load('lstm_model.mat');
net1 = loadedModel.net; % For loading the model in MATLAB
Once the model is saved, you can use it with the 'Stateful Predict' block of Simulink.
You can read more about the 'save' function here:
Hope this helps!
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre 時系列、シーケンス、およびテキストを使用した深層学習 en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!