STANet icon indicating copy to clipboard operation
STANet copied to clipboard

训练的时候显存不大,但是测试的时候会瞬间爆显存是什么情况

Open AllesOderNicht opened this issue 2 years ago • 3 comments

sim_map = torch.bmm(query_local, key_local) # batch matrix multiplication RuntimeError: CUDA out of memory. Tried to allocate 64.00 GiB (GPU 0; 23.69 GiB total capacity; 554.08 MiB already allocated; 21.34 GiB free; 666.00 MiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation. See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF

AllesOderNicht avatar Nov 02 '22 08:11 AllesOderNicht

請問您解決了嗎,我也遇到一樣的問題。

chicheng567 avatar Aug 09 '23 11:08 chicheng567

解决了,原因是因为sta测试的时候图片输入大小为原图,不是256 ---- 回复的原邮件 ---- | 发件人 | @.> | | 发送日期 | 2023年08月09日 19:00 | | 收件人 | justchenhao/STANet @.> | | 抄送人 | XiamuSanhua @.>, Author @.> | | 主题 | Re: [justchenhao/STANet] 训练的时候显存不大,但是测试的时候会瞬间爆显存是什么情况 (Issue #97) |

請問您解決了嗎,我也遇到一樣的問題。

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

AllesOderNicht avatar Aug 13 '23 01:08 AllesOderNicht

我看到了,在val.opt_preprocess把所有的transform都清掉了 難怪跑 val時內存要求總會特別多。非常感謝您的協助

chicheng567 avatar Aug 16 '23 13:08 chicheng567