RangiLyu / nanodet

NanoDet-Plus⚡Super fast and lightweight anchor-free object detection model. 🔥Only 980 KB(int8) / 1.8MB (fp16) and run 97FPS on cellphone🔥
Apache License 2.0
5.71k stars 1.04k forks source link

为什么多卡训练batch_size和单卡一样 #497

Open Deeperfinder opened 1 year ago

Deeperfinder commented 1 year ago

DDP多卡训练模型 GPU_ids:[0,1] 两张2080显卡,batch size只能选择64,一张2080batch size也是选择64. 两张显卡的时候,如果将batch size选择为128,就会提示超出一倍的显存,好奇怪呀。

phonver commented 1 year ago

请问ddp训练除了修改GPU_ids:[0,1]这一部分参数之外还需要修改什么吗?我电脑两个gpu,我写上1,0电脑报错

Deeperfinder commented 1 year ago

没问题啊,是不是你的电脑没有两张显卡呀