torch.cuda.OutOfMemoryError: CUDA out of memory. Tried to allocate 12.00 MiB (GPU 0; 1.96 GiB total ...

这是一个CUDA内存错误,代表GPU内存不足,无法分配12.00 MiB的内存。您可以尝试设置max_split_size_mb以避免内存碎片,以获得更多的内存。请参考PyTorch的内存管理文档以获得更多信息和PYTORCH_CUDA_ALLOC_CONF的配置。

你可能感兴趣的:(torch.cuda.OutOfMemoryError: CUDA out of memory. Tried to allocate 12.00 MiB (GPU 0; 1.96 GiB total ...)