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 error: out of memory #3

Closed
peng666 opened this issue May 14, 2021 · 2 comments
Closed

RuntimeError: CUDA error: out of memory #3

peng666 opened this issue May 14, 2021 · 2 comments

Comments

@peng666
Copy link

peng666 commented May 14, 2021

I train the network through the following command:
python train.py --gpu 0,,1 --workdir log --model msn

When I execute the command, the program stops as follows:

THCudaCheck FAIL file=/opt/conda/conda-bld/pytorch_1616554800319/work/aten/src/THC/THCCachingHostAllocator.cpp line=278 error=2 : out of memory
Traceback (most recent call last):
File "train.py", line 83, in
main()
File "train.py", line 79, in main
model.runner()
File "/home/pjw/projects5/SpareNet/runners/base_runner.py", line 338, in runner
self.val()
File "/home/pjw/projects5/SpareNet/runners/base_runner.py", line 209, in val
self.val_step(items)
File "/home/pjw/projects5/SpareNet/runners/msn_runner.py", line 54, in val_step
, (, _, _, data) = items
File "/home/pjw/projects5/SpareNet/utils/misc.py", line 18, in var_or_cuda
x = x.cuda(non_blocking=True)
RuntimeError: CUDA error: out of memory

@peng666
Copy link
Author

peng666 commented May 14, 2021

The problem has been solved, thank you

@peng666 peng666 closed this as completed May 14, 2021
@HackHarry
Copy link

The problem has been solved, thank you

hello, I have this problem too. How do you solve this?

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