YoloV5_RuntimeError: CUDA out of memory. Tried to allocate 100.00 MiB (GPU 0; 2.00 GiB total capacity; 1.15 GiB already allocated; 0 bytes free; 1.19 GiB reserved in total by PyTorch)

报错信息:

RuntimeError: CUDA out of memory. Tried to allocate 100.00 MiB (GPU 0; 2.00 GiB total capacity; 1.15 GiB already allocated; 0 bytes free; 1.19 GiB reserved in total by PyTorch)
  0%|          | 0/8 [00:02<?, ?it/s]

对策:

  train.py:减小batch-size的default大小

  

   

365个夜晚,我希望做到两天更一篇博客。加油,小白!
原文地址:https://www.cnblogs.com/qq2806933146xiaobai/p/15239354.html