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

SPCONV比普通的resnet要消耗更大的显存 #17

Open
Gchang9 opened this issue Aug 22, 2022 · 1 comment
Open

SPCONV比普通的resnet要消耗更大的显存 #17

Gchang9 opened this issue Aug 22, 2022 · 1 comment

Comments

@Gchang9
Copy link

Gchang9 commented Aug 22, 2022

请问作者,为什么SPCONV+resnet34比pytorch默认的resnet34要使用更大的显存,而且速度较慢?我在知乎:https://zhuanlan.zhihu.com/p/157342686 的评论区内也发现有人在问这个问题,想请问后来解决了吗?谢谢

@qiulinzhang
Copy link
Owner

Hello Gchang9,多谢关注

  1. Spconv结构是会比普通的3x3卷积消耗更多的显存。因为一个大的整体的卷积操作被转换成了几个小的卷积加和以及concat操作,这样在一次卷积操作中,显存需要保存更多的中间变量,虽然每个中间变量比原来的小,但是数量比原来多,所以造成了显存增加的情况
  2. 速度较慢,这个与batchsize有关。由于是一个整体的大卷积操作被转换成了几个小操作,如果batchsize比较小,1,2,4,8这种,速度就会比较慢;当batchsize比较大的时候,比如64 128时,多个小操作的速度就会比一个大操作的速度快。当然,也和显卡有关系,paper在测试时采用的是 NVIDIA TESLA V100 32G, batchsize 64,测试结构是比普通的3x3稍微快一点

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