我正在使用带有Theano后端的keras 1.1.0。为了使用GPU,我设置了os.envorn如下:
os.environ['THEANO_FLAGS'] = "device=gpu0"
在导入Keras之前,我收到了以下信息:
Using gpu device 0: TITAN X (Pascal) (CNMeM is disabled, cuDNN 5105)
/home/library_python/lib/python/Theano-0.8.2-py2.7.egg/theano/sandbox/cuda/__init__.py:600: UserWarning: Your cuDNN version is more recent than the one Theano officially supports. If you see any problems, try updating Theano or downgrading cuDNN to version 5.
warnings.warn(warn)
我原以为我已经正确设置了设备。然而,当我使用keras训练模型时,nvidia-smi显示以下信息:
Fri May 5 13:05:33 2017
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 375.51 Driver Version: 375.51 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GeForce GT 730 On | 0000:01:00.0 N/A | N/A |
| 30% 38C P8 N/A / N/A | 56MiB / 980MiB | N/A Default |
+-------------------------------+----------------------+----------------------+
| 1 TITAN X (Pascal) On | 0000:02:00.0 Off | N/A |
| 36% 63C P2 87W / 250W | 373MiB / 12189MiB | 35% Default |
+-------------------------------+----------------------+----------------------+
| 2 TITAN X (Pascal) On | 0000:03:00.0 Off | N/A |
| 23% 42C P8 18W / 250W | 3MiB / 12189MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 0 Not Supported |
| 1 1520 C /usr/bin/python 155MiB |
| 1 14996 C python 215MiB |
+-----------------------------------------------------------------------------+
显示我只使用了215MB的GPU内存。我预计会有10GB的使用量。请问我错过了什么?我的GPU设置正确吗?
0.95
。 - Autonomous