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

OSError: [Errno 12] Cannot allocate memory #28

Closed
Deeachain opened this issue Jul 22, 2020 · 4 comments
Closed

OSError: [Errno 12] Cannot allocate memory #28

Deeachain opened this issue Jul 22, 2020 · 4 comments

Comments

@Deeachain
Copy link

Deeachain commented Jul 22, 2020

when i train cityscapes with single GPU 1080ti,encounter this error when iters=4000 and iters==8000
OSError: [Errno 12] Cannot allocate memory
I think should decrease Bath_size.So if i need to change 1img/perGPU ,how to do that? And, how to set total Epoch instead of total_iters = 40000

@xvjiarui
Copy link
Collaborator

xvjiarui commented Jul 23, 2020

Hi @Deeachain
May I know, at which stage OSError was raised?
Currently, we don't support setting the total epoch. You may convert from epochs to iterations by yourself.

@Deeachain
Copy link
Author

Hi @xvjiarui
The error OSError occurred in the second time Validation just iter==8000;The cause of that error may be out of the GPU memory.
So i try to reduce the parameters samples_per_gpu==1 in config,but encounter a new error ,Can't set bath size==1?

ValueError: Expected more than 1 value per channel when training, got input size torch.Size([1, 512, 1, 1])

@xvjiarui
Copy link
Collaborator

I think it dues to inefficient CPU memory.
To training with sample_per_gpu=1, you may switch to MMSyncBN. You may refer to here for detailed docs.

@Deeachain
Copy link
Author

I have solved this problem OSError, just add os swap memory.

wjkim81 pushed a commit to wjkim81/mmsegmentation that referenced this issue Dec 3, 2023
Co-authored-by: dmitrysarov <[email protected]>
Co-authored-by: Jas <[email protected]>
sibozhang pushed a commit to sibozhang/mmsegmentation that referenced this issue Mar 22, 2024
* add resolution for K400

* rebenchmark on 32G V100

* add new i3d config and i3d benchmakr

minor

minor

Co-authored-by: linjintao <[email protected]>
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