When I am running the notebook starter I have the following error:
ON GOOGLE COLAB: OutOfMemoryError: CUDA out of memory. Tried to allocate 48.00 MiB. GPU 0 has a total capacity of 14.75 GiB of which 41.06 MiB is free. Process 3682 has 14.70 GiB memory in use. Of the allocated memory 14.51 GiB is allocated by PyTorch, and 43.97 MiB is reserved by PyTorch but unallocated. If reserved but unallocated memory is large try setting PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True to avoid fragmentation. See documentation for Memory Management (https://pytorch.org/docs/stable/notes/cuda.html#environment-variables)
ON KAGGLE: OutOfMemoryError: CUDA out of memory. Tried to allocate 48.00 MiB. GPU 0 has a total capacity of 15.89 GiB of which 21.12 MiB is free. Process 2693 has 15.86 GiB memory in use. Of the allocated memory 15.48 GiB is allocated by PyTorch, and 66.66 MiB is reserved by PyTorch but unallocated. If reserved but unallocated memory is large try setting PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True to avoid fragmentation. See documentation for Memory Management (https://pytorch.org/docs/stable/notes/cuda.html#environment-variables)
Please, Does anyone know how to explain that error and to workaround this error?
Regards.
Reducing the imgsz or the batch size usually does the trick. If not use both GPUs on Kaggle by setting device='0,1'. This is if you can set accelerator to x2
Please @combatant101, what do you mean by setting the device to '0,1'?
It is a parameter which works in Yolo particularly and if you have access to more than one GPU.
Thanks I have Facing the Same problem as well
How to USe TPU for Yolo
Did anyone find a solution to this issue? Need help. I reduce the batch size and the image size, but still the same problem. I deleted the torch caches too.