Code Generation using Graph UX

After you have evaluated the performance of the model, you can convert the best model into optimized C-code that can be deployed on an Edge device that can run C99 code. Graph UX supports code generation between any two nodes in graph on a click of a button. Select the starting and ending node in a graph and generate the C code to deploy the model.

To generate the code, follow the steps:

  1. Navigate to the toolbar and click the Generate Source Code button. The Generate Source Code window appears.

  2. Configure the following parameters:

    • Select From Node and To Node from the drop-down list. The C code is generated between these nodes in the graph. The nodes selected in the From Node and To Node are not included while generating the code.

    • In Architecture select the target architecture for optimization. Select Any(ANSI C99) to compile for any platform.

    • In Output name enter the name of the output file.

    • In Output directory browse the directory where you want to save the optimized output. By, default CodeGen is selected as the default folder.

    • In C Prefix enter the prefix for the function names in the optimized C API.

    • In Timestamps API enable the checkbox to track corresponding input time for each output prediction. To know about the edge API, refer to Edge API.

    • Click Ok to generate the code.