验证 TensorFlow 安装
安装完成后,打开 Python 终端,输入:
import tensorflow as tf
print(tf.__version__)
print(tf.config.list_physical_devices('GPU')) # 有 GPU 返回列表,无则为空
如输出 TensorFlow 版本号且能检测到 GPU,说明 GPU 版本安装成功。
安装完成后,打开 Python 终端,输入:
import tensorflow as tf
print(tf.__version__)
print(tf.config.list_physical_devices('GPU')) # 有 GPU 返回列表,无则为空
如输出 TensorFlow 版本号且能检测到 GPU,说明 GPU 版本安装成功。