Unable to save session in Classification Learner
Mostrar comentarios más antiguos
I have trained models in classification learner based on a dataset and am hoping to save the classificationLearner Session so that I do not have to rerun all the models again everytime, which takes quite a long time. I am currently using the R2022a version, and when I try to save the error, I get an error message that says "The file could not be closed, and might now be corrupt." Any advice on how I can get rid of this error and save the session?
2 comentarios
Walter Roberson
el 22 de Jul. de 2022
Is it possible that you ran out of disk space?
Sonia Tan
el 22 de Jul. de 2022
Respuesta aceptada
Más respuestas (1)
Antonio
el 19 de En. de 2024
0 votos
In my case, this problem is related to MATLAB having problems saving files larger than 2GB in the default configuration of the "save" function. You can try two options:
- Export the model as a Compact Model (Export -> Export Compact Model) to the workspace and save from there as normally done with save(). If that compact model meets the 2GB limit, you will have no problem.
- Otherwise, export the complete or compact model from the workspace using the option '-v7.3' inside the save() function. It was this option that solved the problem in my case.
save(filename, 'modelTrained', '-v7.3')
I hope to be helpful! Sorry I'm late, but I respond for others who have the same problem.
Information about the '-v7.3' configuration: https://es.mathworks.com/matlabcentral/answers/15521-matlab-function-save-and-v7-3
Categorías
Más información sobre Classification Learner App en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!