适配NVIDIA GeForce GTX 480的TensorFlow+Keras版本选择咨询
环境信息
Microsoft Windows [Version 10.0.19045.2965] (c) Microsoft Corporation. All rights reserved. C:\Users\pc>nvcc -V nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2017 NVIDIA Corporation Built on Fri_Sep__1_21:08:32_Central_Daylight_Time_2017 Cuda compilation tools, release 9.0, V9.0.176 C:\Users\pc>nvidia-smi Fri Nov 10 14:02:45 2023 +-----------------------------------------------------------------------------+ | NVIDIA-SMI 391.35 Driver Version: 391.35 | |-------------------------------+----------------------+----------------------+ | GPU Name TCC/WDDM | Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. | |===============================+======================+======================| | 0 GeForce GTX 480 WDDM | 00000000:03:00.0 N/A | N/A | | 44% 63C P12 N/A / N/A | 360MiB / 1536MiB | N/A Default | +-------------------------------+----------------------+----------------------+ +-----------------------------------------------------------------------------+ | Processes: GPU Memory | | GPU PID Type Process name Usage | |=============================================================================| | 0 Not Supported | +-----------------------------------------------------------------------------+ C:\Users\pc>
安装错误信息
C:\Users\pc>pip install tensorflow==2.0.0 ERROR: Could not find a version that satisfies the requirement tensorflow==2.0.0 (from versions: 2.12.0rc0, 2.12.0rc1, 2.12.0, 2.12.1, 2.13.0rc0, 2.13.0rc1, 2.13.0rc2, 2.13.0, 2.13.1, 2.14.0rc0, 2.14.0rc1, 2.14.0, 2.15.0rc0, 2.15.0rc1) ERROR: No matching distribution found for tensorflow==2.0.0
适配的TensorFlow+Keras版本方案
- 核心限制:你的GeForce GTX 480属于NVIDIA Fermi架构,TensorFlow从2.10版本起不再支持该架构;同时当前Python3.11不兼容支持CUDA9.0的早期TensorFlow版本,需要先调整Python版本。
- 版本组合:
- 降级Python到3.7版本(这是同时兼容TensorFlow 2.9.x和CUDA9.0的最高Python版本)
- 安装TensorFlow 2.9.3(最后一个支持Fermi架构的TensorFlow版本,完美匹配CUDA9.0)
- Keras无需单独安装,TensorFlow 2.x版本已内置对应版本的Keras,会随TensorFlow自动部署
- 安装命令(调整Python版本后执行):
pip install tensorflow==2.9.3 - 补充:如果不愿降级Python,可选择安装CPU版本TensorFlow,但GPU无法参与训练,速度会大幅下降。
内容的提问来源于stack exchange,提问作者user366312
相关产品推荐
相关产品推荐

