torch.cuda.OutOfMemoryError: CUDA out of memory.
Tried to allocate 20.00 MiB. GPU 0 has a total capacity of 4.00 GiB of which 2.35 GiB is free.
Of the allocated memory 825.15 MiB is allocated by PyTorch, and 24.85 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
if I don't set it I get OOM:
shouldn't it be activated by default?