运行yolov5报错:
RuntimeError: CUDA error: out of memory
CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1.
Compile with TORCH_USE_CUDA_DSA
to enable device-side assertions.
解决办法:减少batch_size,batch_size默认是16,然后我运行就显示这个错误,我查看网上的资料很多,对于我来说,我将batch_size改成4就可以成功运行了。
其他的解决办法:
能用就行——玄学问题:Compile with TORCH_USE_CUDA_DSA to enable device-side assertions