admin管理员组

文章数量:1611918

RuntimeError: CUDA out of memory. Tried to allocate 320.00 MiB (GPU 0; 10.92 GiB total capacity; 9.95 GiB already allocated; 265.38 MiB free; 156.78 MiB cached)

记录一下pytorch中的运行错误以及解决办法,出现如下问题:

应该是GPU的大小问题,将代码中的batch_size设置小点,我设置的batch_size=128改为batch_size=32就可以运行了。

具体原因我也不太清楚。。。

本文标签: allocateMIBRuntimeErrorCUDAMemory