错误
RuntimeError: CUDA out of memory. Tried to allocate 18.00 MiB (GPU 0; 8.00 GiB total capacity; 6.08 GiB already allocated; 0 bytes free; 6.31 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
错误的原因以及解决的办法
报错的原因是显卡不够用
解决的办法:
①将option.py
文件中的batch
改成1
②换更高级的显卡
以上两种方法均可解决问题