1. 程式人生 > >在TITAN工作站配tensorflow-gpu環境時遇到的問題

在TITAN工作站配tensorflow-gpu環境時遇到的問題

在DELL工作站配tensorflow環境時,遇到的問題

以下報錯均在Anaconda,tensorflow,CUDA,cuDNN安裝完成之後

1、第一次遇到的問題

ImportError: DLL load failed: 找不到指定的模組。

2、第二次遇到的問題

An error ocurred while starting the kernel
2018?? 21:11:45.955960: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
2018?? 21:11:46.356975: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1411] Found device 0 with properties: 
name: TITAN Xp major: 6 minor: 1 memoryClockRate(GHz): 1.582
pciBusID: 0000:17:00.0
totalMemory: 12.00GiB freeMemory: 9.93GiB
2018?? 21:11:46.361920: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1490] Adding visible gpu devices: 0
2018?? 21:11:47.571801: I tensorflow/core/common_runtime/gpu/gpu_device.cc:971] Device interconnect StreamExecutor with strength 1 edge matrix:
2018?? 21:11:47.573474: I tensorflow/core/common_runtime/gpu/gpu_device.cc:977] 0 
2018?? 21:11:47.573894: I tensorflow/core/common_runtime/gpu/gpu_device.cc:990] 0: N 
2018?? 21:11:47.574456: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1103] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 9600 MB memory) ‑> physical GPU (device: 0, name: TITAN Xp, pci bus id: 0000:17:00.0, compute capability: 6.1)
2018?? 21:11:50.041887: E tensorflow/core/grappler/optimizers/dependency_optimizer.cc:666] Iteration = 0, topological sort failed with message: The graph couldn't be sorted in topological order.
2018?? 21:11:50.047857: E tensorflow/core/grappler/optimizers/dependency_optimizer.cc:666] Iteration = 1, topological sort failed with message: The graph couldn't be sorted in topological order.
2018?? 21:11:50.089746: E tensorflow/core/grappler/optimizers/dependency_optimizer.cc:666] Iteration = 0, topological sort failed with message: The graph couldn't be sorted in topological order.
2018?? 21:11:50.093251: E tensorflow/core/grappler/optimizers/dependency_optimizer.cc:666] Iteration = 1, topological sort failed with message: The graph couldn't be sorted in topological order.
2018?? 21:11:50.409585: E tensorflow/stream_executor/cuda/cuda_dnn.cc:353] Could not create cudnn hand

解決方法:

1、2均是由於tensorflow和CUDA、cuDNN的版本適配問題,推薦一種配和:

Anaconda3-5.2.0-Windows-x86_64

cuda_9.0.176_win10

cudnn-9.0-windows10-x64-v7.3.1.20

親測可行。

網上有各種各樣的解決1、2兩種錯誤的方式,經過各種嘗試,都沒有解決問題,反而搞得很混亂,問題因人而異,但是究其根本,我認為還是tensorflow和CUDA、cuDNN的版本問題。