无法在仅CPU的Caffe中使用GPU:检查模式 [英] Cannot use GPU in CPU-only Caffe: check mode

查看:494
本文介绍了无法在仅CPU的Caffe中使用GPU:检查模式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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()

到:

caffe.set_mode_gpu()

但出现错误:

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

我检查了Makefile.config,相关设置为:

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

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

我假设1为True,所以我更改为

I assume 1 is True so I changed to

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

并重建。

这篇关于无法在仅CPU的Caffe中使用GPU:检查模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆