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())
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())