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

剪枝后未加速 #1904

Open
dsdsknfsk opened this issue Dec 19, 2024 · 1 comment
Open

剪枝后未加速 #1904

dsdsknfsk opened this issue Dec 19, 2024 · 1 comment
Assignees

Comments

@dsdsknfsk
Copy link

dsdsknfsk commented Dec 19, 2024

结构化剪枝后的模型(剪枝率约为45%)与原模型的速度在GPU上测的结果没有提升,但是在CPU上测的结果有大幅提升(剪枝后的模型速度约为未剪枝的两倍),请问这是为什么?剪枝后模型需要额外的GPU设置才能加速吗
剪枝前的部分参数shape如下:
backbone.conv1.conv1.conv.weight:[64, 3, 7, 7]
backbone.conv1.conv1.norm.weight:[64]
backbone.conv1.conv1.norm.bias:[64]
backbone.conv1.conv1.norm._mean:[64]
backbone.conv1.conv1.norm._variance:[64]
backbone.res2.res2a.branch2a.conv.weight:[64, 64, 1, 1]
backbone.res2.res2a.branch2a.norm.weight:[64]
backbone.res2.res2a.branch2a.norm.bias:[64]
backbone.res2.res2a.branch2a.norm._mean:[64]
backbone.res2.res2a.branch2a.norm._variance:[64]
与之对应的剪枝后的部分参数shape如下:
backbone.conv1.conv1.conv.weight:[56, 3, 7, 7]
backbone.conv1.conv1.norm.weight:[56]
backbone.conv1.conv1.norm.bias:[56]
backbone.conv1.conv1.norm._mean:[56]
backbone.conv1.conv1.norm._variance:[56]
backbone.res2.res2a.branch2a.conv.weight:[40, 56, 1, 1]
backbone.res2.res2a.branch2a.norm.weight:[40]
backbone.res2.res2a.branch2a.norm.bias:[40]
backbone.res2.res2a.branch2a.norm._mean:[40]
backbone.res2.res2a.branch2a.norm._variance:[40]

@dsdsknfsk
Copy link
Author

@wanghaoshuang 能否解答一下?

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