robot-surgery-segmentation icon indicating copy to clipboard operation
robot-surgery-segmentation copied to clipboard

Issue with GPU Memory

Open RaihanahSyamimi opened this issue 2 years ago • 2 comments

How to fix this?

torch.cuda.OutOfMemoryError: CUDA out of memory. Tried to allocate 2.50 GiB. GPU 0 has a total capacty of 14.75 GiB of which 1.28 GiB is free. Process 33641 has 13.46 GiB memory in use. Of the allocated memory 12.05 GiB is allocated by PyTorch, and 381.06 MiB is reserved by PyTorch but unallocated. If reserved but unallocated memory is large try setting max_split_size_mb to avoid fragmentation. See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF Epoch 1, lr 0.0001: 0% 0/1352 [00:28<?, ?it/s]

RaihanahSyamimi avatar Nov 05 '23 05:11 RaihanahSyamimi

Hello, have you solved this problem? I had this problem too

ChloePines avatar Mar 28 '24 12:03 ChloePines

I did not even know that people use the code 6 years after the release.

Try to replace network with one from https://github.com/qubvel/segmentation_models.pytorch

there are many more powerful and lighter networks.

VGG is ultra hevy, try resnet, resnext, etc, they may work.

ternaus avatar Mar 28 '24 15:03 ternaus