计算机的GPU是2080TI。
按照这个网上的步骤安装的tensorflow2.0
http://www.manongjc.com/detail/15-kcqyretfrurcqmz.html。
具体来说,在安装anaconda后,运行了以下命令
conda config --add channels
https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/conda config --add channels
https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/conda config --set show_channel_urls yes
conda create -n tf2.0 python=3.7
activate tf2.0
conda install tensorflow-gpu==2.0
安装后,进入python测试了下,没发现问题。
我在其他网站上看要安装visual studio, cuCNN, CUDA等。我这些都没安装,有问题吗?运行以下命令
from tensorflow.python.client import device_lib
print(device_lib.list_local_devices())
会打印出
2020-10-04 10:11:26.833780: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1618] Found device 0 with properties:
name: GeForce RTX 2080 Ti major: 7 minor: 5 memoryClockRate(GHz): 1.755
pciBusID: 0000:01:00.0
2020-10-04 10:11:26.833884: I tensorflow/stream_executor/platform/default/dlopen_checker_stub.cc:25] GPU libraries are statically linked, skip dlopen check.
2020-10-04 10:11:26.833978: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1746] Adding visible gpu devices: 0
2020-10-04 10:11:26.834159: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1159] Device interconnect StreamExecutor with strength 1 edge matrix:
2020-10-04 10:11:26.834288: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1165] 0
2020-10-04 10:11:26.834435: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1178] 0: N
2020-10-04 10:11:26.834655: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1304] Created TensorFlow device (/device:GPU:0 with 9532 MB memory) -> physical GPU (device: 0, name: GeForce RTX 2080 Ti, pci bus id: 0000:01:00.0, compute capability: 7.5)
[name: "/device:CPU:0"
device_type: "CPU"
memory_limit: 268435456
locality {
}
incarnation: 17002910072121516587
, name: "/device:GPU:0"
device_type: "GPU"
memory_limit: 9995652301
locality {
bus_id: 1
links {
}
}
incarnation: 7138353233499123102
physical_device_desc: "device: 0, name: GeForce RTX 2080 Ti, pci bus id: 0000:01:00.0, compute capability: 7.5"
]
--
FROM 222.171.7.*