-
Notifications
You must be signed in to change notification settings - Fork 115
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
运行prune 过程中出现键值不对应的问题 #65
Comments
用最新的配置文件 |
我的文件应该都是最新的,请问您具体指的是什么文件呢?请问你有成功裁减x模型吗? |
已经更新了,可以拉下最新代码试试,因为之前只是试了yolov5s,所以将 Lines 399 to 400 in 8a0eff3
写死了. 现在应该支持所有s-x和s6-x6模型了. |
太感谢了,已经可以顺利裁剪了。 |
Traceback (most recent call last): |
您好!您的邮件已收到,尽快给你回复。谢谢 黄总谋!
|
对X 版本进行裁剪,训练和稀疏训练正常,使用prune 文件时出错,请教一下解决办法
发现是pruned_model_state.keys() 和modelstate.keys() 里面的键值不匹配
出错位置代码
` pruned_model = ModelPruned(maskbndict=maskbndict, cfg=pruned_yaml, ch=3).cuda()
# Compatibility updates
for m in pruned_model.modules():
if type(m) in [nn.Hardswish, nn.LeakyReLU, nn.ReLU, nn.ReLU6, nn.SiLU, Detect, Model]:
m.inplace = True # pytorch 1.7.0 compatibility
elif type(m) is Conv:
m._non_persistent_buffers_set = set() # pytorch 1.6.0 compatibility
打印出来裁剪后的模型状态键值远少于裁剪前的
pruned_model_state.keys():
modelstate.keys():
The text was updated successfully, but these errors were encountered: