Can I save a model using saveLearnerForCoder that is larger than 2GB
조회 수: 7 (최근 30일)
이전 댓글 표시
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!
댓글 수: 0
답변 (1개)
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!
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!