Creating a Configuration File - 1.3 English

Vitis AI Optimizer User Guide (UG1333)

Document ID
UG1333
Release Date
2020-12-17
Version
1.3 English

A typical main cfg file for YOLOv3 pruning is as follows. In this example, you will prune a YoloV3 model trained on VOC dataset and prepare the VOC data in the standard Darknet way. Refer to the YOLO website for details.

Because of the YOLOv3 network structure, the convolution layer before the YOLO layer cannot be pruned, which means that if you use standard YOLOv3 cfg file, layer 81, 93, and 105 should be added to “ignore_layer”. A full list of main cfg options can be found in the vai_p_darknet Usage section.
Recommended: Do not 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 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