一、查看版本:
進入到Python的命令行狀態後,可以在终端输入查询命令如下:
import tensorflow as tf tensorflow.__version__
查询tensorflow安装路径为:
tensorflow.__path__
一、cuDNN無法使用
Loaded runtime CuDNN library: 7.0.5 but source was compiled with: 7.1.4. CuDNN library major and minor version needs to match or have higher minor version in case of CuDNN 7.0 or later version. If using a binary install, upgrade your CuDNN library. If building from sources, make sure the library loaded at runtime is compatible with the version specified during compile configuration.
我的開發環境
ubuntu16.04 cuda9.0 cudnn7.0 tensorflow 1.12.0 python 3.6
原因;TensorFlow的版本太高了。
解決方法
pip3 install --upgrade --force-reinstall tensorflow-gpu==1.9.0
原文:https://www.cnblogs.com/darklights/p/9985412.html