Large constant generation - Whether to write large deep learning constants to binary data files - MATLAB (original) (raw)
Main Content
Whether to write large deep learning constants to binary data files
Since R2024a
Description
App Configuration Pane: Code Appearance
Configuration Objects: coder.MexCodeConfig | coder.CodeConfig | coder.EmbeddedCodeConfig
Whether the code generator embeds large constants for a deep neural network (DNN) in the generated source code or writes these constants to binary data files, specified as one of the values in the following table. To specify the threshold (in bytes) above which the DNN constants are written to binary data files, set theLargeConstantThreshold
property. The default value of this property is 131072
.
This property is applicable only if you generate code that does not depend on third-party deep learning libraries.
The generated binary data files are located in the code generation folder and are loaded by the generated code at run time. If you relocate these files, set the environment variable CODER_DATA_PATH
to this new location before running the generated code.
The code generator always embeds the non-DNN constants in the generated source code, irrespective of the sizes of these constants.
Dependencies
EnableDynamicMemoryAllocation
enables this parameter.
Settings
Write only deep learning constants to data files
This value is the default value.
The code generator writes large constants for a deep neural network (DNN) in binary data files.
Keep in source files
The code generator embeds large constants for a deep neural network (DNN) in the generated source code.
Programmatic Use
**Property:**LargeConstantGeneration |
---|
Values:'WriteOnlyDNNConstantsToDataFiles' |'KeepInSourceFiles' |
Default:'WriteOnlyDNNConstantsToDataFiles' |
Version History
Introduced in R2024a