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

RuntimeError: CUDA out of memory #27

Open
Sei2112 opened this issue May 16, 2020 · 4 comments
Open

RuntimeError: CUDA out of memory #27

Sei2112 opened this issue May 16, 2020 · 4 comments

Comments

@Sei2112
Copy link

Sei2112 commented May 16, 2020

hello there!
I was running the UCF101_3DCNN.py in pycharm, and this issue showed up:
RuntimeError: CUDA out of memory. Tried to allocate 1.19 GiB (GPU 0; 6.00 GiB total capacity; 3.60 GiB already allocated; 738.91 MiB free; 3.60 GiB reserved in total by PyTorch)
I changed the batch size to 1 and it disappeared. but I guess it is not a proper way to solve the problem. hope someone could offer some suggestion.

@MounirB
Copy link

MounirB commented May 16, 2020

What kind of GPU do you have ?
Did you try to reduce the image size and make it square (height=weight) ?

@Sei2112
Copy link
Author

Sei2112 commented May 17, 2020

What kind of GPU do you have ?
Did you try to reduce the image size and make it square (height=weight) ?

thanks for your help! I reduced the images to 128*128, now I can set batch size to 16 (if higher than 16 it still goes wrong)

@MounirB
Copy link

MounirB commented May 18, 2020

It depends on your GPU and the C3D implementation. How many parameters are you training ?

@berna-ylmz
Copy link

I have same problem @MounirB . I use my own dataset and set begin_frame = 1,end_frame = 500,size = 256,342,number of classes = 5.
But occur cuda out memory. How can I overcome this problem?
Thanks

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

3 participants