Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Batch size modification #58

Open
chandratejatiriveedhi opened this issue May 12, 2023 · 3 comments
Open

Batch size modification #58

chandratejatiriveedhi opened this issue May 12, 2023 · 3 comments

Comments

@chandratejatiriveedhi
Copy link

I am having an issue when I am trying to train the SETR model on cityscapes dataset using this config file SETR_PUP_768x768_40k_cityscapes_bs_8. I am trying to train this on one GPU and I get the following CUDA out of memory error. Tried to allocate 326.00 MiB (GPU 0; 11.90 GiB total capacity; 10.88 GiB already allocated; 254.94 MiB free; 11.06 GiB reserved in total by PyTorch)
error saying that

I am trying to modify the batchsize to 1 instead of 8, where can I do this in the config file? Is it data = dict(samples_per_gpu=1)? What is the ideal number of GPU's to train this model on CityScapes dataset?

Also, do you have any updated version of the code to run this code on Cuda 11 and beyond.

@sixiaozheng
Copy link
Collaborator

Thank you for your interest in our work. You can change the batch size on https://github.com/fudan-zvg/SETR/blob/main/configs/SETR/SETR_MLA_768x768_80k_cityscapes_bs_8.py#L61 . If you still can't solve the problem, you can try to run other datasets, or SETR-Naive, or change the image size on https://github.com/fudan-zvg/SETR/blob/main/configs/SETR/SETR_MLA_768x768_80k_cityscapes_bs_8.py#L7. For a fair comparison with other papers, we train on 8 GPUs with one sample per GPU. If you want to run SETR on CUDA11, it is recommended to try the implementation of SETR in mmsegmentation https://github.com/open-mmlab/mmsegmentation/tree/main/configs/setr .

@chandratejatiriveedhi
Copy link
Author

chandratejatiriveedhi commented May 21, 2023 via email

@chandratejatiriveedhi
Copy link
Author

chandratejatiriveedhi commented May 28, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants