Can I save a model using saveLearnerForCoder that is larger than 2GB

조회 수: 7 (최근 30일)
Savannah D
Savannah D 2024년 1월 22일
답변: arushi 2024년 7월 4일
I am currently training several regression models that are quite large. To save time on retraining if something were to happen, I've been trying to use saveLearnerForCoder; however, I keep getting the error "Warning: Variable 'compactStruct' was not saved. For variables larger than 2GB use MAT-file version 7.3 or later." but when I try to use the '-v7.3' tag, it says it's too many input variables.
Is there a way to work around the file size/use a different function to save the full model when it is large? Regular save() also does not seem to work because it loads in an empty struct. Thanks!

답변 (1개)

arushi
arushi 2024년 7월 4일
Hi Savannah,
I understand from your query that you want to save variables larger than 2GB. For this, you can use the '-v7.3' flag with the 'save' function. Here is an example of how to use it:
save('model.mat', 'var', '-v7.3');
In '-v7.3', the variables are saved with compression by default. If you do not want this behavior, you can use the '-nocompression' flag.
You can refer to the documentation on version flag for more information:
Hope this helps!

카테고리

Help CenterFile Exchange에서 Support Vector Machine Regression에 대해 자세히 알아보기

제품


릴리스

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by