Python 无法在仅CPU Caffe:检查模式下使用GPU

Python 无法在仅CPU Caffe:检查模式下使用GPU,python,installation,caffe,Python,Installation,Caffe,我使用的是在CPU上运行的传统caffe设置 我从以下位置切换了一行代码: caffe.set_mode_cpu() 致: 但我得到了一个错误: Cannot use GPU in CPU-only Caffe: check mode. 我检查了Makefile.config,相关设置为: #CPU-only switch (uncomment to build without GPU support) CPU_only := 1 我假设1是真的,所以我改为 CPU_only := 0

我使用的是在CPU上运行的传统caffe设置

我从以下位置切换了一行代码:

caffe.set_mode_cpu()
致:

但我得到了一个错误:

Cannot use GPU in CPU-only Caffe: check mode.
我检查了Makefile.config,相关设置为:

#CPU-only switch (uncomment to build without GPU support)
CPU_only := 1
我假设1是真的,所以我改为

CPU_only := 0
但这没有帮助

有什么线索吗?

您需要更改:

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

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

和重建。

注释要使用GPU生成的行:
#仅CPU#u:=1
将CPU#u更改为0后是否重新编译了caffe?
#CPU-only switch (uncomment to build without GPU support)
#CPU_only := 1