【发布时间】:2021-04-18 15:30:50
【问题描述】:
我使用下面安装了 tensorflow
conda create -n gpu_env tensorflow-gpu
conda activate gpu_env
并尝试使用以下代码检查 gpu:
from tensorflow.python.client import device_lib
device_lib.list_local_devices()
输出只显示 cpu。
2021-04-18 20:54:47.012684: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN)to use the following CPU instructions in performance-critical operations: AVX AVX2
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
[name: "/device:CPU:0"
device_type: "CPU"
memory_limit: 268435456
locality {
}
incarnation: 9318913720310627740
]
我该怎么办?
【问题讨论】:
标签: tensorflow anaconda gpu