Mask-ShadowGAN icon indicating copy to clipboard operation
Mask-ShadowGAN copied to clipboard

RuntimeError: CUDA out of memory.

Open Hamzat0014 opened this issue 3 years ago • 1 comments

I am using GPU NVIDIA 2070 Super, when i run "python train_Mask-ShadowGAN" command its gives the following runtime error. Please guide me how to resolve.

RuntimeError: CUDA out of memory. Tried to allocate 39.12 MiB (GPU 0; 7.79 GiB total capacity; 6.27 GiB already allocated; 38.25 MiB free; 89.02 MiB cached)

if I don't do --n_cpu=1 it gives the error ValueError: signal number 32 out of range it

image

I reduce the batch size from 32 to 1 (use the different values) but the error is same. I also tries to clear the cache but it didn't work as import gc gc.collect() torch.cuda.empty_cache()

Please suggest me the solution. Thanks

Hamzat0014 avatar Dec 02 '21 12:12 Hamzat0014

me too

laoxie521 avatar Feb 21 '23 13:02 laoxie521