ternaus / robot-surgery-segmentation

Wining solution and its improvement for MICCAI 2017 Robotic Instrument Segmentation Sub-Challenge
MIT License
623 stars 212 forks source link

Issue with GPU Memory #37

Open RaihanahSyamimi opened 11 months ago

RaihanahSyamimi commented 11 months ago

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]

ChloePines commented 7 months ago

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

ternaus commented 7 months ago

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.