在anaconda中查看某个环境中的tensorflow是cpu还是gpu
在anaconda中查看某个环境中的tensorflow是cpu还是gpu
>>> import os >>> from tensorflow.python.client import device_lib >>> os.environ["TF_CPP_MIN_LOG_LEVEL"] = "99" >>> >>> print(device_lib.list_local_devices()) [name: "/device:CPU:0" device_type: "CPU" memory_limit: 268435456 locality { } incarnation: 5425529995648658955 ] >>> >>>
#############
QQ 3087438119