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

Cuda out of memory while training #46

Closed
Deadmin1 opened this issue Dec 5, 2018 · 2 comments
Closed

Cuda out of memory while training #46

Deadmin1 opened this issue Dec 5, 2018 · 2 comments

Comments

@Deadmin1
Copy link

Deadmin1 commented Dec 5, 2018

Hi,

first thanks to your work here.

I have a problem. always when i get from epoch 0 to 1 i get an "cuda out of memory" error.
I decreased the batch-size to 1 and still get the error. The first epoch runs fine from 8 down.

I am training on a custom dataset. My imagesizes vary.

Running it on a GTX1070.

Thanks in advance

Edit:
multi_scale is set to false
while training used memory of my gtx is:
2445/8116mib
After the first epoch the usage of vram bloats. I just could check it mid epochchange and it was nearly completly used till it ran out of memory again. Whats running that is so intensive in between epochs?

@Deadmin1
Copy link
Author

Deadmin1 commented Dec 5, 2018

Ok found my problem...
If i understand it correct after each train epoch there comes a test "epoch".
Forgot to change the settings in test. It tried to load the COCO dataset and that was to big and overloaded my vram.

@glenn-jocher
Copy link
Member

Yes, training uses up large amounts of GPU ram. Inference to a lesser degree. Try decreasing
-batch_size in test.py to 16 or 8. The default settings work with a 1080 Ti. Anything smaller you'll need to reduce batch size.

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