无法为tensorflow-gpu分配设备进行操作

时间:2019-11-26 03:39:03

标签: tensorflow keras

当前,我正在运行我的机器学习模型。尝试使用笔记本电脑的GPU运行代码。但是,我收到如下错误。我已经安装了CUDA和CuDNN版本10.0和tensorflow-gpu == 1.14。

InvalidArgumentError: Cannot assign a device for operation replica_1/model_1/yolo_layer_3/Variable: node replica_1/model_1/yolo_layer_3/Variable (defined at C:\Users\user\Anaconda3\envs\executewithGPU\lib\site-packages\imageai\Detection\Custom\yolo.py:43) was explicitly assigned to /device:GPU:1 but available devices are [ /job:localhost/replica:0/task:0/device:CPU:0, /job:localhost/replica:0/task:0/device:GPU:0 ]. Make sure the device specification refers to a valid device.
     [[replica_1/model_1/yolo_layer_3/Variable]]

这是我的nvidia-smi

Tue Nov 26 11:33:54 2019
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 441.20       Driver Version: 441.20       CUDA Version: 10.2     |
|-------------------------------+----------------------+----------------------+
| GPU  Name            TCC/WDDM | Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce GTX 1060   WDDM  | 00000000:01:00.0  On |                  N/A |
| N/A   51C    P2    25W /  N/A |    882MiB /  3072MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0       544    C+G   ...x64__8wekyb3d8bbwe\HxCalendarAppImm.exe N/A      |
|    0      6036    C+G   ..._x64__8wekyb3d8bbwe\Microsoft.Notes.exe N/A      |
|    0     10200    C+G   ...t_cw5n1h2txyewy\ShellExperienceHost.exe N/A      |
|    0     11624    C+G   ...54.91.0_x64__kzf8qxf38zg5c\SkypeApp.exe N/A      |
|    0     13188    C+G   C:\Program Files\LGHUB\lghub.exe           N/A      |
|    0     13448    C+G   ...DIA GeForce Experience\NVIDIA Share.exe N/A      |
|    0     14324    C+G   ...dows.Cortana_cw5n1h2txyewy\SearchUI.exe N/A      |
|    0     14860      C   ...naconda3\envs\executewithGPU\python.exe N/A      |
|    0     18132    C+G   C:\Windows\explorer.exe                    N/A      |
|    0     18420    C+G   ...x64__8wekyb3d8bbwe\Microsoft.Photos.exe N/A      |
|    0     19244    C+G   ...6)\Google\Chrome\Application\chrome.exe N/A      |
|    0     19352    C+G   ...6\win32\OmenCommandCenterBackground.exe N/A      |
|    0     19716    C+G   ...osoft.LockApp_cw5n1h2txyewy\LockApp.exe N/A      |
|    0     24548    C+G   Insufficient Permissions                   N/A      |
|    0     26272    C+G   ....525.0_x64__8wekyb3d8bbwe\YourPhone.exe N/A      |
|    0     26864    C+G   ...8.0.0_x64__8wekyb3d8bbwe\Calculator.exe N/A      |
|    0     27432      C   ...naconda3\envs\executewithGPU\python.exe N/A      |
+-----------------------------------------------------------------------------+

问题是:我可以将我的GPU名称从0更改为1吗?还是我还有其他可以做的?

0 个答案:

没有答案