Algorithm 1. Approach of pruning channel and layer in YOLOv4 |
Input: layers and shortcut layers of YOLOv4, channel pruning rate and layer pruning |
Output: The remaining layers after pruning Sparsity training layers and shortcut layers and get of the - channel of - layer Sort of layers and shortcut layers from small to large and then get array Threshold for to do if Remove these channels of - layer end for is shown as Figure 3. is the layer of - shortcut layer structure. for to do if Mark which is the index of channels of layer for to [,,] do Remove channels of layer end for end for Evalute the mean value of for each shortcut layers, then sort from small to large for to do Get the index of shortcut layer Remove and layers end for |