WangYueFt / detr3d

MIT License
745 stars 139 forks source link

How to change the batch_size of DETR3D when training? #29

Closed Bosszhe closed 2 years ago

Bosszhe commented 2 years ago

I have reproduced your excellent work DETR3D but met some trouble, I didn't find the config parameter to change the batch_size of the model. Should it be added to the config.py (like detr3d_res101_gridmask.py)? I will appreciate it to your kindness to answer my question.

a1600012888 commented 2 years ago

Here: https://github.com/WangYueFt/detr3d/blob/main/projects/configs/detr3d/detr3d_res101_gridmask.py#L188

But you might encounter a cuda out of memory if you are not using GPU with large enough memory

Bosszhe commented 2 years ago

Thank you for your answering, how large memory do we need per GPU for DETR3D? I see that you trained with 8 GTX3090 in your paper.

a1600012888 commented 2 years ago

I think I need to add a little detail, the samples_per_gpu denotes the batch size per gpu. And samples_per_gpu =1 means on each GPU there is one frame, which has 6 images(Each frame 6 camera).

Hi, I think for ResNet-101 with FPN. samples_per_gpu takes around 20GB memory.

Bosszhe commented 2 years ago

Thx for your kindly response.