Pytorch_Retinaface icon indicating copy to clipboard operation
Pytorch_Retinaface copied to clipboard

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

Open Yooben-Li opened this issue 4 years ago • 2 comments

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

Yooben-Li avatar Jun 13 '20 10:06 Yooben-Li

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

flywheel1412 avatar Jun 26 '20 02:06 flywheel1412

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

uestcyile avatar Jun 11 '21 03:06 uestcyile