Cannot use GPU in CPU-only Caffe: check mode

两盒软妹~` 提交于 2019-12-11 06:57:13

问题


I am using a legacy set up of caffe which is running on CPU.

I switched one line of code from:

caffe.set_mode_cpu()

to:

caffe.set_mode_gpu()

but I get the error:

Cannot use GPU in CPU-only Caffe: check mode.

I checked the Makefile.config and the relevant setting was:

#CPU-only switch (uncomment to build without GPU support)
CPU_only := 1

I assume 1 is True so I changed to

CPU_only := 0

but it did not help.

Any clues?


回答1:


You need to change:

#CPU-only switch (uncomment to build without GPU support)
CPU_only := 1

to this:

#CPU-only switch (uncomment to build without GPU support)
#CPU_only := 1

and rebuild.



来源:https://stackoverflow.com/questions/40382361/cannot-use-gpu-in-cpu-only-caffe-check-mode

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!