RuntimeError: CUDA out of memory. Tried to allocate 2.08 GiB (GPU 0; 4.00 GiB total capacity; 274.14

RuntimeError: CUDA out of memory. Tried to allocate 2.08 GiB (GPU 0; 4.00 GiB total capacity; 274.14 MiB already allocated; 2.63 GiB free; 55.86 MiB cached)
解决办法:
num_works = 4改成num_works = 0;
batchseiz = 2改成batchsize = 1;

猜你喜欢

转载自blog.csdn.net/weixin_44823313/article/details/113824773