raceback (most recent call last):
File "predict.py", line 96, in <module>
main()
File "predict.py", line 23, in main
_, arg_params, aux_params = mx.model.load_checkpoint(args.model_load_prefix, args.model_load_epoch)
File "/home/ggj/ggj/pro/mxnet-face-master/mxnet/python/mxnet/model.py", line 361, in load_checkpoint
save_dict = nd.load('%s-%04d.params' % (prefix, epoch))
File "/home/ggj/ggj/pro/mxnet-face-master/mxnet/python/mxnet/ndarray.py", line 983, in load
ctypes.byref(names)))
File "/home/ggj/ggj/pro/mxnet-face-master/mxnet/python/mxnet/base.py", line 77, in check_call
raise MXNetError(py_str(_LIB.MXGetLastError()))
xnet.base.MXNetError: [11:47:31] src/ndarray/ndarray.cc:347: GPU is not enabled
gj@ggj-All-Series:~/ggj/pro/mxnet-face-master/attribute$ ^C
gj@ggj-All-Series:~/ggj/pro/mxnet-face-master/attribute$ nvidia-smi
on Sep 26 11:57:15 2016
------------------------------------------------------+
NVIDIA-SMI 361.28 Driver Version: 361.28 |
-------------------------------+----------------------+----------------------+
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 GTX TIT... Off | 0000:01:00.0 On | N/A |
29% 45C P8 15W / 250W | 246MiB / 6140MiB | 0% Default |
-------------------------------+----------------------+----------------------+
-----------------------------------------------------------------------------+
Processes: GPU Memory |
GPU PID Type Process name Usage |
=============================================================================|
0 2716 G /usr/bin/X 154MiB |
0 3318 G compiz 72MiB |
这个问题的原因是:
如果nvidia-smi 有------------------------------------------------------+
NVIDIA-SMI 361.28 Driver Version: 361.28 |
-------------------------------+----------------------+----------------------+
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 GTX TIT... Off | 0000:01:00.0 On | N/A |
29% 45C P8 15W / 250W | 246MiB / 6140MiB | 0% Default |
-------------------------------+----------------------+----------------------+
表明我的gpu 显卡是装好的。
但是为什么显示:GPU is not enabled
原因是在编译mxnet 的时候 需要去make 文件夹下面有个config.mk
下面有个
USE_CUDA =1
USE_CUDA_PATH=/usr/local/cuda
然后在mxnet 目录下重新make clean && make
就搞定了这个问题