当前位置:网站首页>Tsinghua University image source will cause tensorflow GPU installation failure

Tsinghua University image source will cause tensorflow GPU installation failure

2022-06-12 23:42:00 An autumn moon

The author has previously installed pytorch Add Tsinghua University channel to , Later installed tensorflow-gpu Always installed is tensorflow Of cpu edition

1. View the installation image

conda config --get channels

2. Delete the default image

conda config --remove-key channels

3. Then reinstall tensorflow-gpu

conda install tensorflow-gpu=1.10

3. see gpu Is the call successful

import os
os.environ["CUDA_VISIBLE_DEVICES"] = "0"
from tensorflow.python.client import device_lib
print(device_lib.list_local_devices())
[name: "/device:CPU:0"
device_type: "CPU"
memory_limit: 268435456
locality {
}
incarnation: 9864097557774494597
, name: "/device:GPU:0"
device_type: "GPU"
memory_limit: 10738902631
locality {
  bus_id: 1
  links {
  }
}
incarnation: 3161576480591350016
physical_device_desc: "device: 0, name: GeForce RTX 2080 Ti, pci bus id: 0000:18:00.0, compute capability: 7.5"
]

The terminal displays the above interface , be gpu Version installed successfully

原网站

版权声明
本文为[An autumn moon]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202280944261954.html