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

第一次forward的时候显存暴涨vgg #44

Open
wuzuowuyou opened this issue May 28, 2020 · 0 comments
Open

第一次forward的时候显存暴涨vgg #44

wuzuowuyou opened this issue May 28, 2020 · 0 comments

Comments

@wuzuowuyou
Copy link

wuzuowuyou commented May 28, 2020

测试模式,当第一次运行到refinedet.py的forward的以下代码的时候:

for k in range(30):
            x = self.vgg[k](x)###############
            if 22 == k:
                s = self.conv4_3_L2Norm(x)
                sources.append(s)
            elif 29 == k:
                s = self.conv5_3_L2Norm(x)
                sources.append(s)

        # apply vgg up to fc7
        aaa = len(self.vgg)
        for k in range(30, len(self.vgg)):
            x = self.vgg[k](x)
        sources.append(x)

在 x = self.vggk这行,用vgg跑前向的时候,
当i=5的时候,执行x = self.vggk这句话,显存会快速达到4851M然后快速降到800多M
当i=7的时候,执行x = self.vggk这句话,显存会快速达到1609M然后快速降到800多M
。。。
看了下都是卷积层
但是为什么是第一次的时候,后面不会有问题了!!!!so,why第一次的时候会出现后面不会??

用的320大小的图片

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

1 participant