查阅官网后可知,该命令已经被删除掉了。

tensorflow-gpu · PyPI

【解决办法】

我直接安装了其他版本的包

pip install tensorflow-gpu==2.10.0

测试

import tensorflow as tf

print("tf.__version__: ", tf.__version__)

# print("tf.test.is_gpu_available(): ", tf.test.is_gpu_available())

print("tf.config.list_physical_devices('GPU'): ", tf.config.list_physical_devices('GPU'))

Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐