Tensorflow报错记录

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

建议使用 Ctrl+F 查找。

ImportError: libcudnn.so.5: cannot open shared object file: No such file or directory

原因:1)环境变量里关于 cuda 的路径设置错误;2)tensorflow 与 cuda 版本不匹配
解决:先看自己路径对不对,记得 source 更新一下,查一下自己的 tensorflow-gpu 版本应该用什么版本的 cuda 和 cudnn,参考:cuda和tensorflow-gpu对应版本的安装及测试

Resource exhausted: OOM when allocating tensor with shape

原因:1)batch size 太大;2)GPU 的显存太小,或者剩余的显存太少
解决:调整 batch,或者等 GPU 空下来

InternalError: Dst tensor is not initialized

原因:一般是 GPU 内存耗尽
解决:用 export CUDA_VISIBLE_DEVICES=1,设置仅显卡设备 GPU=1 可见

Loaded runtime CuDNN library: 5005 (compatibility version 5000) but source was compiled with 5110 (compatibility version 5100).  If using a binary install, upgrade your CuDNN library to match.  If building from sources, make sure the library loaded at runtime matches a compatible version specified during compile configuration.

原因:cudnn 版本不对
解决:换对应版本 cuda和tensorflow-gpu对应版本的安装及测试

猜你喜欢

转载自blog.csdn.net/qq_31347869/article/details/102736377