Comments (3)
ristretto work on cpu mode , set "cpu=0" ?
from mvision.
// 1.不加 --gpu=x,x,x,x,x 选项
// 2.使用--gpu=all 选项 如果计算机无CUDA设备,则设置为无GPU模式,仅使用CPU
void Quantization::SetGpu() {
// Parse GPU ids or use all available devices
vector gpus;
if (gpus_ == "all")
{
int count = 0;
#ifndef CPU_ONLY
CUDA_CHECK(cudaGetDeviceCount(&count));// 获取所有可以CUDA设备数量
#else
NO_GPU;
#endif
for (int i = 0; i < count; ++i)
{
gpus.push_back(i);
}
}
else if (gpus_.size())
{
vector strings;
// 字符串 --gpu=x,x,x,x,x
boost::split(strings, gpus_, boost::is_any_of(","));// 按 , 号分割==
for (int i = 0; i < strings.size(); ++i)
{
gpus.push_back(boost::lexical_cast(strings[i]));
}
}
else
{
CHECK_EQ(gpus.size(), 0);// 大于等于0 如果命令行参数中没有 --gpu=x,x,x,x,x 选项
}
// Set device id and mode
if (gpus.size() != 0)
{
LOG(INFO) << "Use GPU with device ID " << gpus[0];
Caffe::SetDevice(gpus[0]);
Caffe::set_mode(Caffe::GPU);
}
else
{
LOG(INFO) << "Use CPU.";
Caffe::set_mode(Caffe::CPU);
}
}
from mvision.
l 选项 如果计算机无CUDA设备,则设置为无GPU模式,仅使
thanks
from mvision.
Related Issues (20)
- 量化时的近似策略 HOT 2
- 如何读取视频流的时候获取当前数据包所属的特定区域? HOT 5
- Have you finished the quantization?
- 最新手册5.2了,建议开源这个翻译
- 百度云部分资料链接失效,提取码错误
- 3d 识别
- 只为👍一句牛逼
- 大佬,想问一下那个ORB_SLAM2+拓扑地图,那个怎么用啊
- 无法解析的外部符号 LZ4_decompress_safe
- CSCA算法运行
- 好
- Strassen卷积代码中有错误
- mobilenet SSDLite coordinate error HOT 1
- ristretto-ssd编译不过
- stereo file has problems
- ncnn::ROIAlign不支持 批量ROI操作 HOT 1
- NCNN不支持GNN
- 请问没有功能演示的视频吗?另外该机器人对应硬件相关哪里买呢? HOT 1
- Is there any video showing the function? In addition, where can I buy the corresponding hardware for this robot?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mvision.