-
Notifications
You must be signed in to change notification settings - Fork 145
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
VGG16,显存溢出问题 #18
Comments
我发现一个可能的解释了,那个FC层,AlexNet,VGG以及其他model,都使用了两层FC,每层4096个单元,占用了大量的内存。 but我感觉应该用不到这么多节点。 |
呃,不行,还是不够。。。默认的keras的数据类型是float32是吗? 我之前用tensorflow直接搭了个inception v4,299x299x3 size,也是float32,没有显存溢出问题。 这边代码应该是有点问题的。。 |
卧槽。。。。up主,你的VGG16模型那边,前两层卷积后,少了一次最大池化。。。。VGG19也是。 |
把normal_size设小点,没有一定说要用224大小 |
少了池化的问题,我看一下哈 |
你是不是用了64位的float |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
config文件里面,我设置了参数batch_size = 32,normal_size = 224,然后使用VGG16之后,显存直接溢出了。训练集共3400多张图片,按说不至于吧。
我尝试了使用CPU + 内存运行,我显存8G,内存32G,想看下实际模型占用需要多少内存,结果一个batch之后,内存占用竟然达到31.1G。全部加载完图片大概是10G内存占用,也就是说中间21.1G是模型的。
我想确认下,请问up你有遇到过这个情况吗?或者有比较好的解释和解决方案吗?
The text was updated successfully, but these errors were encountered: