CUDA:out of memory问题

基于UCSD-AI4H/COVID-CT进行训练时,出现以下错误:

RuntimeError: CUDA out of memory. Tried to allocate 98.00 MiB (GPU 0; 2.00 GiB total capacity; 1.53 GiB already allocated; 9.93 MiB free; 1.55 GiB reserved in total by PyTorch)

 

解决方法:

将batch_size由32改为10,问题解决。

你可能感兴趣的:(AI,pytorch,pycharm)