Device: Rtx 3050ti laptop gpu, i7 12 gen cpu with 16 gb ram
usig this to run the code
yolo task=detect mode=train epochs=10 data=data_custom.yaml model=yolov8l.pt device=0
and getting the same error everytime
torch.cuda.OutOfMemoryError: CUDA out of memory.
Tried to allocate 20.00 MiB (GPU 0; 3.80 GiB total capacity; 2.44 GiB already allocated; 23.38 MiB free; 2.47 GiB reserved in total by PyTorch)
If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation.
See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF
to get rid of this error and run the code on the gpu itself