Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

剪枝mAP=0?inference没变?正确的流程应该怎样? #30

Open
zihaozhang9 opened this issue Dec 23, 2019 · 2 comments
Open

剪枝mAP=0?inference没变?正确的流程应该怎样? #30

zihaozhang9 opened this issue Dec 23, 2019 · 2 comments

Comments

@zihaozhang9
Copy link

我使用如下命令进行剪枝
`python train.py --cfg cfg/yolov3.cfg --data data
--weights weights/last.pt
--epochs 100 --batch-size 16 -sr --s 0.001 --prune 1

python shortcut_prune.py --cfg cfg/yolov3.cfg --data data
--weights weights/last.pt
--percent 0.6`

稀疏训练没有100epochs就停止了。
然后结果非常糟糕
image
请问有何建议?
是需要更多的稀疏训练?然后需要fine tune吗。剪枝之后,不训练,map也可以正常吗?
inference没变?是因为我使用了显卡吗。本来很快?所以剪枝加速不明显?(使用的1080ti单卡)

@tanluren
Copy link
Owner

稀疏训练是一个完整的过程,建议看看readme分享的案例,稀疏后要达到的效果是bn weight较大压缩,精度较大回升;剪枝的比例因你的稀疏情况不同,效果也不一样,剪后掉点厉害就尝试剪少一点,如果是掉点的,finetune是必须的;另外不同数据集的剪枝比例也不一样;速度方面单纯剪通道的话速度不一定有提升,看机器,剪层的一般会有提升,建议使用slim prune剪通道,layer prune剪层

@zihaozhang9
Copy link
Author

单纯剪通道的话速度不一定有提升,看机器,剪层的一般会有提升,建议使用slim prune剪通道,layer prune剪层

好的。我再学习一下

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants