Matlab trained Model dissapeard of the workspace

조회 수: 5 (최근 30일)
Frank
Frank 2023년 10월 12일
답변: Jayanti 2025년 8월 22일
Hello here is my problem, i am following the ExampleModel.mlx of Matlab for a fittness tracker but the trained model dissapeard of my workspace each time I am running my Matlab live Code. Has anybody encounter this problem ?
  댓글 수: 1
Harald
Harald 2023년 10월 12일
Hi,
can you specify where to find ExampleModel.mlx or attach it, please?
If you are running own code afterwards, does it possibly contain clear commands?
Best wishes,
Harald

댓글을 달려면 로그인하십시오.

답변 (1개)

Jayanti
Jayanti 2025년 8월 22일
Hi Frank,
Since I don't have access to your mlx file, I am assuming if you might not have explicitly saved the model. Unless you explicitly save your trained model, it will only exist in memory during that session, and disappear once the workspace resets.
You can save your trained model to a MAT-file at the end of the training section, and then load it in later runs without retraining.
Add the following lines after training is complete to store trained model to file named "trainedFitnessModel".
save('trainedFitnessModel.mat','trainedModel');
When you want to use the trained model again, add this line at the beginning of your script
load('trainedFitnessModel.mat','trainedModel');
Hope it helps!

카테고리

Help CenterFile Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

제품


릴리스

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by