RuntimeError: CUDA out of memory. Tried to allocate 5.06 GiB (GPU 0; 8.00 GiB total capacity; 4.65 GiB already allocated; 1.45 GiB free; 4.69 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