CUDA Toolkit | Linux x86_64 Driver Version | Windows x86_64 Driver Version |
---|---|---|
CUDA 11.1.1 Update 1 | >=455.32 | >=456.81 |
CUDA 11.1 GA | >=455.23 | >=456.38 |
CUDA 11.0.3 Update 1 | >= 450.51.06 | >= 451.82 |
CUDA 11.0.2 GA | >= 450.51.05 | >= 451.48 |
CUDA 11.0.1 RC | >= 450.36.06 | >= 451.22 |
CUDA 10.2.89 | >= 440.33 | >= 441.22 |
CUDA 10.1 (10.1.105 general release, and updates) | >= 418.39 | >= 418.96 |
CUDA 10.0.130 | >= 410.48 | >= 411.31 |
CUDA 9.2 (9.2.148 Update 1) | >= 396.37 | >= 398.26 |
CUDA 9.2 (9.2.88) | >= 396.26 | >= 397.44 |
CUDA 9.1 (9.1.85) | >= 390.46 | >= 391.29 |
CUDA 9.0 (9.0.76) | >= 384.81 | >= 385.54 |
CUDA 8.0 (8.0.61 GA2) | >= 375.26 | >= 376.51 |
CUDA 8.0 (8.0.44) | >= 367.48 | >= 369.30 |
CUDA 7.5 (7.5.16) | >= 352.31 | >= 353.66 |
CUDA 7.0 (7.0.28) | >= 346.46 | >= 347.62 |
版本 | P ython 版本 |
编译器 | 构建工具 | cuDNN | CUDA |
---|---|---|---|---|---|
tensorflow_gpu-2.3.0 | 3.5-3.8 | MSVC 2019 | Bazel 3.1.0 | 7.4 | 10.1 |
tensorflow_gpu-2.2.0 | 3.5-3.8 | MSVC 2019 | Bazel 2.0.0 | 7.4 | 10.1 |
tensorflow_gpu-2.1.0 | 3.5-3.7 | MSVC 2019 | Bazel 0.27.1-0.29.1 | 7.4 | 10.1 |
tensorflow_gpu-2.0.0 | 3.5-3.7 | MSVC 2017 | Bazel 0.26.1 | 7.4 | 10 |
tensorflow_gpu-1.15.0 | 3.5-3.7 | MSVC 2017 | Bazel 0.26.1 | 7.4 | 10 |
tensorflow_gpu-1.14.0 | 3.5-3.7 | MSVC 2017 | Bazel 0.24.1-0.25.2 | 7.4 | 10 |
tensorflow_gpu-1.13.0 | 3.5-3.7 | MSVC 2015 update 3 | Bazel 0.19.0-0.21.0 | 7.4 | 10 |
tensorflow_gpu-1.12.0 | 3.5-3.6 | MSVC 2015 update 3 | Bazel 0.15.0 | 7 | 9 |
tensorflow_gpu-1.11.0 | 3.5-3.6 | MSVC 2015 update 3 | Bazel 0.15.0 | 7 | 9 |
tensorflow_gpu-1.10.0 | 3.5-3.6 | MSVC 2015 update 3 | Cmake v3.6.3 | 7 | 9 |
tensorflow_gpu-1.9.0 | 3.5-3.6 | MSVC 2015 update 3 | Cmake v3.6.3 | 7 | 9 |
tensorflow_gpu-1.8.0 | 3.5-3.6 | MSVC 2015 update 3 | Cmake v3.6.3 | 7 | 9 |
tensorflow_gpu-1.7.0 | 3.5-3.6 | MSVC 2015 update 3 | Cmake v3.6.3 | 7 | 9 |
tensorflow_gpu-1.6.0 | 3.5-3.6 | MSVC 2015 update 3 | Cmake v3.6.3 | 7 | 9 |
tensorflow_gpu-1.5.0 | 3.5-3.6 | MSVC 2015 update 3 | Cmake v3.6.3 | 7 | 9 |
tensorflow_gpu-1.4.0 | 3.5-3.6 | MSVC 2015 update 3 | Cmake v3.6.3 | 6 | 8 |
tensorflow_gpu-1.3.0 | 3.5-3.6 | MSVC 2015 update 3 | Cmake v3.6.3 | 6 | 8 |
tensorflow_gpu-1.2.0 | 3.5-3.6 | MSVC 2015 update 3 | Cmake v3.6.3 | 5.1 | 8 |
tensorflow_gpu-1.1.0 | 3.5 | MSVC 2015 update 3 | Cmake v3.6.3 | 5.1 | 8 |
tensorflow_gpu-1.0.0 | 3.5 | MSVC 2015 update 3 | Cmake v3.6.3 | 5.1 | 8 |
Framework | Env name (--env parameter) | Description | Docker Image | Packages and Nvidia Settings |
---|---|---|---|---|
TensorFlow 2.2 | tensorflow-2.2 | TensorFlow 2.2.0 + Keras 2.3.1 on Python 3.7. | floydhub/tensorflow | TensorFlow-2.2 |
TensorFlow 2.1 | tensorflow-2.1 | TensorFlow 2.1.0 + Keras 2.3.1 on Python 3.6. | floydhub/tensorflow | TensorFlow-2.1 |
TensorFlow 2.0 | tensorflow-2.0 | TensorFlow 2.0.0 + Keras 2.3.1 on Python 3.6. | floydhub/tensorflow | TensorFlow-2.0 |
TensorFlow 1.15 | tensorflow-1.15 | TensorFlow 1.15.0 + Keras 2.3.1 on Python 3.6. | floydhub/tensorflow | TensorFlow-1.15 |
TensorFlow 1.14 | tensorflow-1.14 | TensorFlow 1.14.0 + Keras 2.2.5 on Python 3.6. | floydhub/tensorflow | TensorFlow-1.14 |
TensorFlow 1.13 | tensorflow-1.13 | TensorFlow 1.13.0 + Keras 2.2.4 on Python 3.6. | floydhub/tensorflow | TensorFlow-1.13 |
TensorFlow 1.12 | tensorflow-1.12 | TensorFlow 1.12.0 + Keras 2.2.4 on Python 3.6. | floydhub/tensorflow | TensorFlow-1.12 |
tensorflow-1.12:py2 | TensorFlow 1.12.0 + Keras 2.2.4 on Python 2. | floydhub/tensorflow | ||
TensorFlow 1.11 | tensorflow-1.11 | TensorFlow 1.11.0 + Keras 2.2.4 on Python 3.6. | floydhub/tensorflow | TensorFlow-1.11 |
tensorflow-1.11:py2 | TensorFlow 1.11.0 + Keras 2.2.4 on Python 2. | floydhub/tensorflow | ||
TensorFlow 1.10 | tensorflow-1.10 | TensorFlow 1.10.0 + Keras 2.2.0 on Python 3.6. | floydhub/tensorflow | TensorFlow-1.10 |
tensorflow-1.10:py2 | TensorFlow 1.10.0 + Keras 2.2.0 on Python 2. | floydhub/tensorflow | ||
TensorFlow 1.9 | tensorflow-1.9 | TensorFlow 1.9.0 + Keras 2.2.0 on Python 3.6. | floydhub/tensorflow | TensorFlow-1.9 |
tensorflow-1.9:py2 | TensorFlow 1.9.0 + Keras 2.2.0 on Python 2. | floydhub/tensorflow | ||
TensorFlow 1.8 | tensorflow-1.8 | TensorFlow 1.8.0 + Keras 2.1.6 on Python 3.6. | floydhub/tensorflow | TensorFlow-1.8 |
tensorflow-1.8:py2 | TensorFlow 1.8.0 + Keras 2.1.6 on Python 2. | floydhub/tensorflow | ||
TensorFlow 1.7 | tensorflow-1.7 | TensorFlow 1.7.0 + Keras 2.1.6 on Python 3.6. | floydhub/tensorflow | TensorFlow-1.7 |
tensorflow-1.7:py2 | TensorFlow 1.7.0 + Keras 2.1.6 on Python 2. | floydhub/tensorflow | ||
TensorFlow 1.5 | tensorflow-1.5 | TensorFlow 1.5.0 + Keras 2.1.6 on Python 3.6. | floydhub/tensorflow | TensorFlow-1.5 |
tensorflow-1.5:py2 | TensorFlow 1.5.0 + Keras 2.1.6 on Python 2. | floydhub/tensorflow | ||
TensorFlow 1.4 | tensorflow-1.4 | TensorFlow 1.4.0 + Keras 2.0.8 on Python 3.6. | floydhub/tensorflow | |
tensorflow-1.4:py2 | TensorFlow 1.4.0 + Keras 2.0.8 on Python 2. | floydhub/tensorflow | ||
TensorFlow 1.3 | tensorflow-1.3 | TensorFlow 1.3.0 + Keras 2.0.6 on Python 3.6. | floydhub/tensorflow | |
tensorflow-1.3:py2 | TensorFlow 1.3.0 + Keras 2.0.6 on Python 2. | floydhub/tensorflow | ||
TensorFlow 1.2 | tensorflow-1.2 | TensorFlow 1.2.0 + Keras 2.0.6 on Python 3.5. | floydhub/tensorflow | |
tensorflow-1.2:py2 | TensorFlow 1.2.0 + Keras 2.0.6 on Python 2. | floydhub/tensorflow | ||
TensorFlow 1.1 | tensorflow | TensorFlow 1.1.0 + Keras 2.0.6 on Python 3.5. | floydhub/tensorflow | |
tensorflow:py2 | TensorFlow 1.1.0 + Keras 2.0.6 on Python 2. | floydhub/tensorflow | ||
TensorFlow 1.0 | tensorflow-1.0 | TensorFlow 1.0.0 + Keras 2.0.6 on Python 3.5. | floydhub/tensorflow | |
tensorflow-1.0:py2 | TensorFlow 1.0.0 + Keras 2.0.6 on Python 2. | floydhub/tensorflow | ||
TensorFlow 0.12 | tensorflow-0.12 | TensorFlow 0.12.1 + Keras 1.2.2 on Python 3.5. | floydhub/tensorflow | |
tensorflow-0.12:py2 | TensorFlow 0.12.1 + Keras 1.2.2 on Python 2. | floydhub/tensorflow |
本文写作时间2020年12月1日,请参照最新表格选择。以上并不绝对,只是大厂做的匹配推荐。
我们尊重新鲜事物的产生,我们也非常喜欢新鲜事物,新的版本代表着新的功能和新的效果。但是新的并非最好。特别是涉及到版本兼容问题时。
经实际测试效果,如果装tensorflow 2以上的版本,会出现各种问题。原因如下:第一句翻译:TF2.0中很多API要么....要么...。所以呀,为了眼下的方便,不考虑以后的话。先装TF1.0版本吧。
Many APIs are either gone or moved in TF 2.0. Some of the major changes include removing tf.app, tf.flags, and tf.logging in favor of the now open-source absl-py, rehoming projects that lived in tf.contrib, and cleaning up the main tf.* namespace by moving lesser used functions into subpackages like tf.math.
根据:TF版本,观察Cuda的版本,我们发现10.1都对应TF2.0,所以,我们退一步,让一步,选择CUDA10.0。这样让我们接下来选择的空间更大。CUDA10.0让我们可进可退。后续转TF2.0也支持。
本人笔记本NVIDIA GeForce GTX 1070。选择CUDA10.0。对应显卡驱动版本CUDA Toolkit and Compatible Driver Versions>=411.31。只要大于这个版本都支持。这个可以放心选择。CuDnn按照表推荐7.4。
CUDNN7.4限制tensorFlow对应的版本,也限制在了tensorFlow1.13以上的版本。可选项只有13,14,15三个版本。15在匹配Keras的时候,需要匹配最新keras,所以我们选择13或者14。稳妥点选择13。
TensorFlow建议keras2.2.4。这下子所有版本齐了。
考虑Python的版本,你要考虑你的其他使用场景,要让Python支持更多的场景。目前根据我的应用场景选择3.6稳妥些。因为我的需求中有些模块点明不支持3.5以下版本,有些模块又不支持太新3.7也不妥。完全是被动呀。不过你看表3.6支持的版本最多呀。欣慰至甚,欢欣甚慰。以此你也可以看出python3.6目前也是Python比较好的一个版本选择。
先装显卡驱动,后装CUDA,然后复制替换CUDNN。
安装完CUDA后需要配置环境变量。
检测CMD下输入:nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2018 NVIDIA Corporation
Built on Sat_Aug_25_21:08:04_Central_Daylight_Time_2018
Cuda compilation tools, release 10.0, V10.0.130
安装Python3.6.5。
然后安装Tensorflow。
pip install tensorflow_gpu==1.13.1 -i https://pypi.tuna.tsinghua.edu.cn/simple
再不行,从PyPI自己下载轮子。对应好python和系统的版本找版本下载(浏览器下载慢,直接用迅雷下)。直接pip install相应whl。
pip install .\tensorflow_gpu-1.13.1-cp36-cp36m-win_amd64.whl
import tensorflow as tf
tf.__version__
可以输出版本号即安装正确。
安装Keras。Over。
pip3 install keras==2.2.4 -i https://pypi.tuna.tsinghua.edu.cn/simple