Help Center/
Atlas 300 Application (Model 3000)/
TE Custom Operator Development Guide/
Loading the Plug-In for Model Conversion
Updated on 2022-03-13 GMT+08:00
Loading the Plug-In for Model Conversion
Principle Description
Figure 1 shows the model conversion process when the custom operator plug-in is loaded.
- The offline model generator (OMG) loads the model file and custom operator plug-in, parses the operator in the model file, and converts the custom operator into the intermediate representation (IR) operator.
- The OMG converts the data of the custom operator based on the running environment, calculates the running memory, compiles and generates the binary file (*.o) of the custom operator, and generates the Da Vinci offline model file (*.om).
- During application running, the offline model executor (OME) obtains the input data, loads the offline model file, calls the operator cyclically, and outputs the result data.
Operating Procedure
- Go to the root directory of the custom operator development project as the DDK installation user.
cd $HOME/tools/projects/customop_te/
- Run the following command to convert the model:
omg --model=model/deploy_mylenet-1.prototxt --weight=model/mylenet-1.caffemodel --framework=0 --plugin_path=plugin --output=mylenet --ddk_version=1.3.T18.B850
- --model: relative path of the original model file of the MyLeNet network
- --weight: relative path of the pre-trained model file of the MyLeNet network
- --framework: original framework type
- 0: Caffe
- 3: TensorFlow
- --plugin: directory where the custom operator plug-in is located
- --output: name of the output model file, which can be customized
- --ddk_version: version number of the matched DDK for running the custom operator. You can view the version number of the DDK in the $HOME/tools/che/ddk/ddk/ddk_info file.
For details about other parameters, see Model Conversion Guide.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
The system is busy. Please try again later.
For any further questions, feel free to contact us through the chatbot.
Chatbot