-
Notifications
You must be signed in to change notification settings - Fork 98
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
内存溢出 #28
Comments
i met the same problem. |
change the batchsize |
我将main.py中以下代码的batch_size分别改为16,8,4进行了尝试,结果还是产生了内存溢出,将pin_memory设置为False也不起作用。 |
设置成1吧 我都是设置成1来运行的 |
我用的cpu为i7-10750h,内存16G,改小batch_size后内存溢出的问题就消失了 |
换个大点数据集应该直接不能用了 |
我在google colab中运行该代码,程序运行了一半就异常终止了。内存分配有问题?
/usr/local/lib/python3.7/dist-packages/torchvision/transforms/transforms.py:258: UserWarning: Argument interpolation should be of type InterpolationMode instead of int. Please, use InterpolationMode enum.
"Argument interpolation should be of type InterpolationMode instead of int. "
| feature extraction | train | bottle |: 100% 7/7 [01:13<00:00, 10.52s/it]
tcmalloc: large alloc 2013462528 bytes == 0x559a8ac86000 @ 0x7fb9c58f4b6b 0x7fb9c5914379 0x7fb9452dc25e 0x7fb9452dd9d2 0x7fb981fc08e6 0x7fb982422dd9 0x7fb98292d77a 0x7fb9828f8ef9 0x7fb9828af657 0x7fb982753929 0x7fb98242690c 0x7fb982a34209 0x7fb982a3448a 0x7fb982908239 0x7fb9828bc31e 0x7fb98278f4fb 0x7fb993b45823 0x5599bf2bdcc0 0x5599bf2bda50 0x5599bf331be0 0x5599bf2bf30a 0x5599bf32d3b5 0x5599bf32c7ad 0x5599bf2bf3ea 0x5599bf32d3b5 0x5599bf32c4ae 0x5599bf32c1b3 0x5599bf3f6182 0x5599bf3f64fd 0x5599bf3f63a6 0x5599bf3cd723
tcmalloc: large alloc 2013462528 bytes == 0x559b02cb6000 @ 0x7fb9c58f4b6b 0x7fb9c5914379 0x7fb9452dc25e 0x7fb9452dd9d2 0x7fb981fc08e6 0x7fb982422dd9 0x7fb98292d77a 0x7fb9828f8ef9 0x7fb9828af657 0x7fb982753929 0x7fb98242c6a2 0x7fb982a2a882 0x7fb9828b0609 0x7fb982755e7e 0x7fb982177c46 0x7fb982933310 0x7fb98281e5cc 0x7fb983f544c0 0x7fb983f54944 0x7fb98281e5cc 0x7fb993d5dfa3 0x5599bf2bdcc0 0x5599bf2bda50 0x5599bf331be0 0x5599bf32c4ae 0x5599bf2bf3ea 0x5599bf32e32a 0x5599bf2bf30a 0x5599bf32d3b5 0x5599bf32c7ad 0x5599bf2bf3ea
tcmalloc: large alloc 2013462528 bytes == 0x559a62c76000 @ 0x7fb9c58f4b6b 0x7fb9c5914379 0x7fb9452dc25e 0x7fb9452dd9d2 0x7fb981fc08e6 0x7fb982422dd9 0x7fb98292d77a 0x7fb9828f8ef9 0x7fb9828af657 0x7fb982753929 0x7fb98242c6a2 0x7fb982a2a882 0x7fb9828b0609 0x7fb982755e7e 0x7fb982236586 0x7fb9829333ae 0x7fb98281f607 0x7fb983f58bc8 0x7fb983f5904c 0x7fb98281f607 0x7fb993d55532 0x5599bf2bdcc0 0x5599bf2bda50 0x5599bf331be0 0x5599bf32c4ae 0x5599bf2bf3ea 0x5599bf32e32a 0x5599bf2bf30a 0x5599bf32d3b5 0x5599bf32c7ad 0x5599bf2bf3ea
tcmalloc: large alloc 4698079232 bytes == 0x559ba563c000 @ 0x7fb9c58f4b6b 0x7fb9c5914379 0x7fb9452dc25e 0x7fb9452dd9d2 0x7fb981fc08e6 0x7fb982422dd9 0x7fb98292d77a 0x7fb9828f8ef9 0x7fb9828af657 0x7fb982753929 0x7fb98242690c 0x7fb982a34209 0x7fb982a3448a 0x7fb982908239 0x7fb9828bc31e 0x7fb98278f4fb 0x7fb993b45823 0x5599bf2bdcc0 0x5599bf2bda50 0x5599bf331be0 0x5599bf2bf30a 0x5599bf32d3b5 0x5599bf32c7ad 0x5599bf2bf3ea 0x5599bf32d3b5 0x5599bf32c4ae 0x5599bf32c1b3 0x5599bf3f6182 0x5599bf3f64fd 0x5599bf3f63a6 0x5599bf3cd723
tcmalloc: large alloc 4698079232 bytes == 0x559cbd6ac000 @ 0x7fb9c58f4b6b 0x7fb9c5914379 0x7fb9452dc25e 0x7fb9452dd9d2 0x7fb981fc08e6 0x7fb982422dd9 0x7fb98292d77a 0x7fb9828f8ef9 0x7fb9828af657 0x7fb982753929 0x7fb98242c6a2 0x7fb982a2a882 0x7fb9828b0609 0x7fb982755e7e 0x7fb982177c46 0x7fb982933310 0x7fb98281e5cc 0x7fb983f544c0 0x7fb983f54944 0x7fb98281e5cc 0x7fb993d5dfa3 0x5599bf2bdcc0 0x5599bf2bda50 0x5599bf331be0 0x5599bf32c4ae 0x5599bf2bf3ea 0x5599bf32e32a 0x5599bf2bf30a 0x5599bf32d3b5 0x5599bf32c7ad 0x5599bf2bf3ea
^C
The text was updated successfully, but these errors were encountered: