huochaitiantang / pytorch-deep-image-matting

Pytorch implementation of deep image matting
294 stars 71 forks source link

CUDA out of memory #30

Open flyfish01 opened 4 years ago

flyfish01 commented 4 years ago

Hi, Is there a way to limit the gpu memory, my computer gpu is 6g, when i use command nvidia-smi to watch, the memory was consumed soon. Thank you

The error prompt is below: RuntimeError: CUDA out of memory. Tried to allocate 500.00 MiB (GPU 0; 6.00 GiB total capacity; 4.10 GiB already allocated; 226.63 MiB free; 26.43 MiB cached)

myCigar commented 4 years ago

Try to change the batch_size to a smaller value ? For example, changing batch_size value to 1

flyfish01 commented 4 years ago

@myCigar thank you, let me try

ahmetybilgin commented 4 years ago

Hi, Did you solve it? @flyfish01