Research Article
Model Lightweighting for Real-time Distraction Detection on Resource-Limited Devices
Algorithm 1
The proposed CNN light-weighting method.
| Input: training data , validation data ; | | the th convolution layer with filters ; | | the th convolution layer bottleneck residual block number ; | | the th convolution layer channel number ; | | Output: the light-weighting model and the updated , , and . | (1) | for in convolution layers do | (2) | Optimization n and c based on (2); | (3) | Fine-tuning the module; | (4) | Update n and c based on accuracy; | (5) | for pruning ratios ⟵ 0.1 to 0.9 do | (6) | Fine-tuning the module; | (7) | Update pruning ratios based on accuracy controlled decrease within ; | (8) | end for | (9) | end for | (10) | Get final parameters , , and and fine-tuning the pruned model with . |
|