报错cudnn的问题:

return F.conv2d(input, weight, bias, self.stride,
RuntimeError: cuDNN error: CUDNN_STATUS_INTERNAL_ERROR
You can try to repro this exception using the following code snippet. If that doesn't trigger the error, please include your original repro script when reporting this issue.

总是再net.forward()这里报错,可能是环境的问题,但是这个环境用的是好好的,cudnn版本与torch都对应,就是报错,尝试了好几种办法,最后简单的一句命令解决。

解决:

 

CUDA_VISIBLE_DEVICES=1 python inference.py

加一行GPU号指定就可以了,完美!!!

有用别忘了一键三连!!!


版权声明:本文为qq_38308388原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
原文链接:https://blog.csdn.net/qq_38308388/article/details/130014965