Matlab Coding in C++ with forest is very long and consumes it in RAM

5 次查看(过去 30 天)
We try to generate c++ library from Matlab functions with random forest inside.
We run code generation on 2,4ghz cpu and 60 Go RAM.
Our 3 forests size (50-120Mo).
The library generation duration is 3 hours and it use 60go RAM.
The other library code generation duration are a few minutes (without random forest of course).
My questions :
Do you have similar codegen duration with random forest? Same question with RAM usage?
Do you have tricks to speed up code generation and decrease RAM usage?

回答(1 个)

Manish
Manish 2025-5-12
Hi,
Regarding the query, "Do you have tricks to speed up code generation and decrease RAM usage?":
You can use the 'compact' function to reduce the size of the model.
Refer to the documentation below for more information:
Additionally, please refer to the following documentation for steps to increase code generation speed:
Hope this helps!

类别

Help CenterFile Exchange 中查找有关 MATLAB Coder 的更多信息

标签

产品


版本

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by