问题
RuntimeError: CUDA out of memory. Tried to allocate 14.00 MiB (GPU 0; 4.00 GiB total capacity; 2.34 GiB already allocated; 13.70 MiB free; 2.41 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
解决方法
GPU内存不足,找到train.py文件下的parse_opt函数
将函数中的batch_size调低即可(箭头所指的地方),具体调到多少需要自行测试。