[英]The problem while installing tensorflow-gpu?
我已經在我的電腦上安裝了 tensorflow-gpu。 然后我在 anaconda(tf_gpu) 中創建了一個環境來使用 tensorflow-gpu。
在我打開 anaconda prompt 並激活 tf_gpu 環境后,我輸入:
python
from tensorflow.python.client import device_lib
print(device_lib.list_local_devices())
我得到這個輸出:
2019-07-20 16:47:07.670932: I
tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports
instructions that this TensorFlow binary was not compiled to use: AVX
AVX2
2019-07-20 16:47:07.843280: I
tensorflow/core/common_runtime/gpu/gpu_device.cc:1433] Found device 0
with properties:
name: GeForce GTX 950M major: 5 minor: 0 memoryClockRate(GHz): 0.928
pciBusID: 0000:01:00.0
totalMemory: 4.00GiB freeMemory: 3.34GiB
2019-07-20 16:47:07.850883: I
tensorflow/core/common_runtime/gpu/gpu_device.cc:1512] Adding visible
gpu devices: 0
2019-07-20 16:48:53.443303: I
tensorflow/core/common_runtime/gpu/gpu_device.cc:984] Device interconnect
StreamExecutor with strength 1 edge matrix:
2019-07-20 16:48:53.449483: I
tensorflow/core/common_runtime/gpu/gpu_device.cc:990] 0
2019-07-20 16:48:53.453555: I
tensorflow/core/common_runtime/gpu/gpu_device.cc:1003] 0: N
2019-07-20 16:48:53.462369: I
tensorflow/core/common_runtime/gpu/gpu_device.cc:1115] Created TensorFlow
device (/device:GPU:0 with 3050 MB memory) -> physical GPU (device: 0,
name: GeForce GTX 950M, pci bus id: 0000:01:00.0, compute capability:
5.0)
[name: "/device:CPU:0"
device_type: "CPU"
memory_limit: 268435456
locality {
}
incarnation: 659623925268091428
, name: "/device:GPU:0"
device_type: "GPU"
memory_limit: 3198956339
locality {
bus_id: 1
links {
}
}
incarnation: 17589411030014621263
physical_device_desc: "device: 0, name: GeForce GTX 950M, pci bus id:
0000:01:00.0, compute capability: 5.0"
]
當我打開 spyder 並輸入相同的 2 行代碼時:
from tensorflow.python.client import device_lib
print(device_lib.list_local_devices())
什么也沒有發生,它試圖永遠編譯它。 沒有錯誤,沒有輸出。 我也有 tensorflow-cpu 環境,當我在 gpu 環境中嘗試一些在 tensorflow-cpu 環境中工作的代碼時,也沒有任何反應。 再次編譯需要很長時間。 你認為有什么問題?
你確定它什么都不做? 你試過等待嗎? 我曾經遇到過這個錯誤:
https://github.com/tensorflow/tensorflow/issues/18652
那里的大多數人建議安裝最新的夜間版本。 它似乎正在工作
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.