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 #16

Open
pyzhang2008 opened this issue May 11, 2020 · 1 comment
Open

RuntimeError: CUDA error: out of memory #16

pyzhang2008 opened this issue May 11, 2020 · 1 comment

Comments

@pyzhang2008
Copy link

pyzhang2008 commented May 11, 2020

I was trying to test mode 1~3, while it met CUDA error.

Traceback (most recent call last):
File "test.py", line 388, in
Testing()
File "test.py", line 42, in Testing
lane_agent.load_weights(640, "tensor(0.2298)")
File "/home//PINet/agent.py", line 292, in load_weights
torch.load(self.p.model_path+str(epoch)+''+str(loss)+''+'lane_detection_network.pkl'),False
File "/home/
/anaconda3/lib/python3.7/site-packages/torch/serialization.py", line 593, in load
return _legacy_load(opened_file, map_location, pickle_module, pickle_load_args)
File "/home/
/anaconda3/lib/python3.7/site-packages/torch/serialization.py", line 773, in _legacy_load
result = unpickler.load()
File "/home/
/anaconda3/lib/python3.7/site-packages/torch/serialization.py", line 729, in persistent_load
deserialized_objects[root_key] = restore_location(obj, location)
File "/home/
/anaconda3/lib/python3.7/site-packages/torch/serialization.py", line 178, in default_restore_location
result = fn(storage, location)
File "/home/
/anaconda3/lib/python3.7/site-packages/torch/serialization.py", line 158, in _cuda_deserialize
return storage_type(obj.size())
File "/home/
*/anaconda3/lib/python3.7/site-packages/torch/cuda/init.py", line 433, in _lazy_new
return super(_CudaBase, cls).new(cls, *args, **kwargs)
RuntimeError: CUDA error: out of memory

@koyeongmin
Copy link
Owner

It looks like your GPU memory is lack. Could you check this point? In my case, I am using 2080ti, also you can control memory usage by changing batchsize.

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