查看tensorflow版本和GPU设备

时间:2024-04-10 20:14:31

1 打开 Anoconda的prompt
2 **环境:activate tensorflow
3 输入 python

4 输入: import tensorflow as tf
5 查看版本: tf.__version__
查看安装位置:

6 、tf.__path__

7、查看GPU设备:接着上图依次输入下面三行语句:

语句1:from tensorflow.python.client import device_lib

语句1:if __name__ =="__main__":
语句1:print(device_lib.list_local_devices())

查看tensorflow版本和GPU设备

相关文章