Function: set_model_dir
Applicability
|
Product |
Supported (√/x) |
|---|---|
|
|
√ |
|
|
√ |
|
|
√ |
|
|
√ |
|
|
√ |
Function Usage
Sets the directory for loading model files. The directory stores single-operator model files (*.om files).
Prototype
- C Prototype
1aclError aclopSetModelDir(const char *modelDir)
- Python Function
1ret = acl.op.set_model_dir(model_dir)
Parameter Description
|
Parameter |
Description |
|---|---|
|
model_dir |
Str, directory where the specified model file is stored. A multi-level directory is supported. However, the system reads the model up to three levels down from the last level. For the example, if modelDir is set to dir0/dir1 and dir1 contains dir2/dir3/dir4, the system looks up for the model file in dir1, dir1/dir2 and dir1/dir2/dir3 only. |
Return Value Description
|
Return Value |
Description |
|---|---|
|
ret |
Int, error code: 0 on success; else, failure. |
Restrictions
Before loading the model file, check whether the memory space is sufficient based on the file size. If the memory space is insufficient, the application will be abnormal.
For the
For the
For the
For the
For the