1.prunin文件下的main函数超参数输入如下
Options: Namespace(cpu=False, data='../data', epochs=300, eval_batch_size=256, evaluate=False, gpu_id='', lr=0.01, num_workers=2, refine='', resume='', s=0.001, sr=True, train_batch_size=512, wd=1e-07)
稀疏训练后,模型准确率为89.21%
2.根据该稀疏模型,做正常剪枝/规整剪枝,超参数如下
Namespace(cpu=False, data='../data', layers=9, model='models_save/nin_preprune.pth', normal_regular=1, percent=0.5, save='models_save/nin_prune.pth')
问题:
!please turn down the prune_ratio!
layer_index: 3 total_channel: 192 remaining_channel: 1 pruned_ratio: 0.994792
!please turn down the prune_ratio!
layer_index: 6 total_channel: 160 remaining_channel: 1 pruned_ratio: 0.993750
!please turn down the prune_ratio!
layer_index: 10 total_channel: 96 remaining_channel: 1 pruned_ratio: 0.989583
!please turn down the prune_ratio!
layer_index: 15 total_channel: 192 remaining_channel: 1 pruned_ratio: 0.994792
!please turn down the prune_ratio!
layer_index: 19 total_channel: 192 remaining_channel: 1 pruned_ratio: 0.994792
!please turn down the prune_ratio!
layer_index: 23 total_channel: 192 remaining_channel: 1 pruned_ratio: 0.994792
!please turn down the prune_ratio!
layer_index: 28 total_channel: 192 remaining_channel: 1 pruned_ratio: 0.994792
!please turn down the prune_ratio!
layer_index: 32 total_channel: 192 remaining_channel: 1 pruned_ratio: 0.994792
剪完后的通道数异常,全部仅为1,调整percent=0.9仍出现相同错误;规整剪枝同样存在以下问题。
是否因为稀疏训练时设置的s只能为0.0001