Creating a Configuration File - 1.1 English

AI Optimizer User Guide (UG1333)

Document ID
UG1333
Release Date
2020-07-07
Version
1.1 English

A typical main cfg file for YoloV3 pruning is as follow. In this example, we prune a YoloV3 model trained on VOC dataset. Also prepare the VOC data in the standard darknet way. Refer to https://pjreddie.com/darknet/yolo/ for details. Because of the YoloV3 network structure, the convolution layer before yolo layer can’t be pruned. In another word, if you use standard YoloV3 cfg file, layer 81, 93 and 105 should be added to “ignore_layer”. In addition, we recommend not to prune the convolution layer before 81, 93 and 105. The ana step will be very slow if layers 80, 92,104 are not ignored. A full list of main cfg options can be found in Section “vai_p_darknet Usage”.

# a cfg example to prune YoloV3
[pruning]
workspace=pruning
datacfg=pruning/voc.data
modelcfg=pruning/yolov3-voc.cfg
prunedcfg=pruning/yolov3-voc-prune.cfg
ana_out_file=pruning/ana.out
prune_out_weights=pruning/weights.prune
criteria=0
kernel_batch=2
ignore_layer=80,81,92,93,104,105
yolov3=1
threshold=0.005