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

批量处理图像时的问题 #51

Open
YuhuiMa opened this issue Oct 21, 2021 · 5 comments
Open

批量处理图像时的问题 #51

YuhuiMa opened this issue Oct 21, 2021 · 5 comments

Comments

@YuhuiMa
Copy link

YuhuiMa commented Oct 21, 2021

您好!我这边用这个代码处理单张图没问题,但python里面写for循环批量处理图片的时候GPU的显存占用会随着处理图片数量的增大而增大,最终会报CUDA out of memory,请问该如何解决?

@Panghema
Copy link

应该是hook没释放吧

@YuhuiMa
Copy link
Author

YuhuiMa commented Jun 23, 2022

那应该如何修改代码呢

@Panghema
Copy link

emm 我看了下有这个函数remove_handlers释放了的 确认下有没有正常调用吧 如果这个有释放 我也不清楚了。。

@YuhuiMa
Copy link
Author

YuhuiMa commented Jun 23, 2022

好的,我看看。

@zhhtu
Copy link

zhhtu commented Jul 28, 2022

self.handlers.remove(handle)

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

3 participants