tensorflow - TensorFlow 未使用 GPU 编译
问题描述
我的操作系统是 64 位 Windows 10,我刚刚使用 Anaconda 安装了支持 GPU 的 tensorflow 版本。当我尝试运行它时,出现了一些错误:
>>> import tensorflow as tf
>>> sess = tf.Session(config=tf.ConfigProto(log_device_placement=True))
2018-05-21 19:35:51.322771: I T:\src\github\tensorflow\tensorflow\core\platform\cpu_feature_guard.cc:140] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
2018-05-21 19:35:55.372582: E T:\src\github\tensorflow\tensorflow\stream_executor\cuda\cuda_driver.cc:406] failed call to cuInit: CUDA_ERROR_NO_DEVICE
2018-05-21 19:35:55.414069: I T:\src\github\tensorflow\tensorflow\stream_executor\cuda\cuda_diagnostics.cc:158] retrieving CUDA diagnostic information for host: DESKTOP-IGTS77R
2018-05-21 19:35:55.440073: I T:\src\github\tensorflow\tensorflow\stream_executor\cuda\cuda_diagnostics.cc:165] hostname: DESKTOP-IGTS77R
Device mapping: no known devices.
2018-05-21 19:35:55.454801: I T:\src\github\tensorflow\tensorflow\core\common_runtime\direct_session.cc:284] Device mapping:
如何修复错误?我已经安装了 CUDA9.0 和 CUDNN7.0,我的 python 版本是 3.6。
解决方案
推荐阅读
- r - 我在 plotrix 包中使用 taylor.diagram 函数,例如在 R
- mysql - 从 K8s 集群设置 MySql 只读
- reactjs - 元 og 标记在使用 Next.js 甚至 facebook 调试器时都不起作用
- azure-cosmosdb - Cosmos DB 的 _ts 时间戳有多准确?(时间漂移)
- c++ - 我需要计算 arctan(x),结果显示“nan”,我的代码有什么问题?
- node.js - Smooch - 从缓冲区创建附件
- javascript - URLSearchParams 可以让参数不区分大小写吗?
- amazon-redshift - 删除和重新创建表后,Redshift 查询未完成
- python - Pandas - 将多个 CSV 保存在 zip 存档中
- c++ - VC++ 应用程序崩溃不显示