Tensorflow查看GPU还是CPU运行

Tensorflow查看GPU还是CPU运行
import os
from tensorflow.python.client import device_lib
os.environ[“TF_CPP_MIN_LOG_LEVEL”] = “99”

if name == “main”:
print(device_lib.list_local_devices())

发布了2 篇原创文章 · 获赞 0 · 访问量 85

猜你喜欢

转载自blog.csdn.net/weixin_39945925/article/details/103572626