0

我正在按照官方页面和“验证您的安装”步骤中的说明安装 Tensorflow。

在此处输入图像描述

>>> sess = tf.Session()
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE3 instructions, but these are available on your machine and could speed up CPU computations.
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations.
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations.
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations.
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX2 instructions, but these are available on your machine and could speed up CPU computations.
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use FMA instructions, but these are available on your machine and could speed up CPU computations.
E tensorflow/stream_executor/cuda/cuda_driver.cc:509] failed call to cuInit: CUDA_ERROR_NO_DEVICE
I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:158] retrieving CUDA diagnostic information for host: Shu
I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:165] hostname: Shu
I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:189] libcuda reported version is: 375.26.0
I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:363] driver version file contents: """NVRM version: NVIDIA UNIX x86_64 Kernel Module  367.57  Mon Oct  3 20:37:01 PDT 2016
GCC version:  gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 
"""
I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:193] kernel reported version is: 367.57.0
E tensorflow/stream_executor/cuda/cuda_diagnostics.cc:303] kernel version 367.57.0 does not match DSO version 375.26.0 -- cannot find working devices in this configuration

这是我尝试开始会话时得到的。我不太明白发生了什么事。请帮助。谢谢!

4

1 回答 1

5

我不认为该错误与 Tensorflow 有关。您应该在运行nvidia-smi时遇到同样的错误。

安装 CUDA 工具包后,您是否可以更新您的 NVIDIA GPU 驱动程序?看起来该工具包需要驱动程序版本 367.57,而您正在运行更新的版本 375.26。

要快速检查,请尝试恢复到 NVIDIA 驱动程序版本 367.57;您可以从System Settings > Software and Updates > Additional Drivers进行操作。

一旦确认预期驱动程序版本不匹配是问题所在,您可以继续使用驱动程序版本 367.57,或卸载 CUDA Toolkit 和 cuDNN,将驱动程序更新到 375.26,然后重新安装 CUDA Toolkit 和 cuDNN。

于 2017-02-17T11:38:42.820 回答