OutOfMemoryError: CUDA out of memory. Tried to allocate 4.00 GiB (GPU 0; 23.99 GiB total capacity; 6.14 GiB already allocated; 16.21 GiB free; 6.15 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

メモリ不足ではないはずなのにこんなエラー出るのですがどう解決すれば良いでしょうか?