KevinMuyaoGuo / yolov5s_for_satellite_imagery

基于YOLOv5的卫星图像目标检测demo | A demo for satellite imagery object detection based on YOLOv5
GNU General Public License v3.0
202 stars 44 forks source link

为什么会出现显存累加上涨的问题? #1

Open taochx opened 4 years ago

taochx commented 4 years ago

您好,我在运行您的代码的时候,出现了gpu_mem在每一次Epoch后都上涨的问题,最终导致显存爆了,请问这个是什么原因?

 Epoch   gpu_mem      GIoU       obj       cls     total   targets  img_size
  0/99     1.84G   0.07251   0.03948   0.04516    0.1572         7      1024: 100%|██████████| 3938/3938 [17:07<00:00,  3.83it/s]
           Class      Images     Targets           P           R      mAP@.5  mAP@.5:.95: 100%|██████████| 1325/1325 [03:46<00:00,  5.86it/s]
             all     5.3e+03    5.98e+04       0.175       0.335       0.278       0.124

 Epoch   gpu_mem      GIoU       obj       cls     total   targets  img_size
  1/99     5.69G   0.05713   0.03359   0.01962    0.1103         0      1024: 100%|██████████| 3938/3938 [16:54<00:00,  3.88it/s]
           Class      Images     Targets           P           R      mAP@.5  mAP@.5:.95: 100%|██████████| 1325/1325 [04:04<00:00,  5.42it/s]
             all     5.3e+03    5.98e+04       0.335       0.489       0.414       0.214

 Epoch   gpu_mem      GIoU       obj       cls     total   targets  img_size
  2/99     6.63G    0.0563   0.03319   0.01625    0.1057        23      1024: 100%|█████████▉| 3937/3938 [16:50<00:00,  3.90it/s]

Traceback (most recent call last):

taochx commented 4 years ago

自己解决了,其实就是8G显存太低了,batch size设置为1都爆了

yanxioa commented 3 years ago

请问是如何解决的?