biubug6 / Pytorch_Retinaface

Retinaface get 80.99% in widerface hard val using mobilenet0.25.
MIT License
2.6k stars 764 forks source link

How can i training Resnet50 model use single GPU 8G? #103

Open Yooben-Li opened 4 years ago

Yooben-Li commented 4 years ago

请问应该怎么修改config里面的配置,可以在单卡8G显存上可以训练,目前训练时间长短都能接受,当前在config里面把图像大小改成48,batch_size 设成2,还是跑不起来。

flywheel1412 commented 4 years ago

加上这句试试 torch.cuda.empty_cache()

uestcyile commented 3 years ago
  1. 把config文件中的ngpu改成1
  2. 调低config文件中的batch_size,可尝试将batch_size改为4