在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的版本问题。还有就是要Anaconda安装的最后安装Visual Studio。

你可能感兴趣的:(深度学习,TensorFlow)