ModelLoadOptV2
Select the corresponding configuration as required. If the configuration is different from the actual input, RuntimeError is thrown at Model.
Property Name |
Type |
Description |
|---|---|---|
modelType |
ModelType enumerations |
Inference model type. The options are as follows: (The default value is base.model_type_om.)
|
loadType |
ModelLoadType enumerations |
Input type of the inference model. You can select an input mode by setting the following parameters: (The default value is base.load_model_from_file.)
|
modelPath |
str |
Path of the inference model file. This parameter takes effect only in the following modes. (The default value is "". A model with a maximum size of 4 GB is supported, and it is recommended that the model owner be the current user. The permission on the model file must be less than or equal to 640.)
|
modelPtr |
int |
Memory address of the inference model. This parameter takes effect only in the following modes. (The default value is 0. Enter the memory address as required.)
|
modelSize |
int |
Data length of the inference model, in bytes. This parameter takes effect only in the following modes. (The default value is 0. A model with a maximum size of 4 GB is supported.)
|
modelWorkPtr |
int |
Workspace address of the inference model. This parameter takes effect only in the following modes. (The default value is 0, indicating that the system manages the workspace.)
|
modelWeightPtr |
int |
Weight memory address of the inference model. This parameter takes effect only in the following modes. (The default value is 0, indicating that the system manages the memory.)
|
workSize |
int |
Workspace size of the inference model, in bytes. (The default value is 0. This parameter is invalid when modelWorkPtr is 0.) |
weightSize |
int |
Weight memory size of the inference model, in bytes. (The default value is 0. This parameter is invalid when modelWeightPtr is 0.) |