Compiler
The Compiler tool is located at ~/SGS_IPU_SDK/Scripts/calibrator/compiler.py
.
This tool is used to convert the SigmaStar fixed-point network model to the SigmaStar offline network model. Run the following script in ~/SGS_IPU_SDK
directory (can be ignored, if this has already been done):
cd ~/SGS_IPU_SDK source cfg_env.sh
Enter the working directory for this tool. Here is a usage example:
python3 compiler.py \ -m ~/SGS_Models/tensorflow/ssd_mobilenet_v1/ssd_mobilenet_fixed.sim
Related parameter description:
-m
,--model
: Network model file path.
Optional parameter:
-
-c
,--category
: Category of the model, mainly including Classification, Detection, and Unknown.Classification
: The model has one output, which will output the top 5 scores from high to low based on the output score.Detection
: The model has four outputs, which will be converted to the bbox position and category of the input image based on the output. Only SigmaStar post-processing operator is supported. For details, see SigmaStar Post-Processing Model. Please use Unknown for other post-processing.Unknown
: The model output does not belong to the above two types. It will output all the Tensor values. When a fixed-point network model is converted to an offline network model, it is default set to Unknown.
-
-o
,--output
: Model output path. You can specify the location for fixed-point network model output data. If a folder is assigned to the floating-point network model, the output will be automatically named with the file prefix, followed by sgsimg.img; if a particular path is assigned along with a filename, the output will be named by the specified path and filename; if nothing is specified, the fixed-point network model will be stored in the path of the floating-point network model file.