自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(10)
  • 收藏
  • 关注

原创 img2col

#include <iostream>using namespace std;namespace test_caffe {inline bool is_a_ge_zero_and_a_lt_b(int a, int b) { return static_cast<unsigned>(a) < static_cast<unsigned>(b); //验证只有 0<=a<b 才返回真 //若 0<=a<b 显然返回真 .

2021-02-26 18:02:53 443

原创 caffe C++简单例子

主要参考与caffe源码中的caffe.cpp文件#define CPU_ONLY#include <glog/logging.h>#include <string>#include <vector>#include <memory>#include "ass.h"#include "caffe/caffe.hpp"#include "caffe/util/signal_handler.h"using namespace caffe;usi

2021-02-25 17:15:11 262

原创 RNN简单实现

卷积层反向传播from layer_utils import *class ThreeLayerConvNet(object): """ A three-layer convolutional network with the following architecture: conv - relu - 2x2 max pool - affine - relu - affine - softmax """ def __ini

2021-02-25 14:21:44 180

原创 CAFFE_LAYER_FACTORY

#ifndef CAFFE_LAYER_FACTORY_H_#define CAFFE_LAYER_FACTORY_H_#include <map>#include <string>#include <vector>#include "caffe/common.hpp"#include "caffe/layer.hpp"#include "caffe/proto/caffe.pb.h"namespace caffe {template <t

2021-02-23 15:09:02 86

原创 右值引用及std::mode

右值右值引用是为了解决不必要的拷贝以及使能完美转发而引入的新的引用类型。当右边的赋值类型是一个右值,左边的对象可以从右边的对象中偷取资源而不是重新分配拷贝,这个偷取的过程叫做移动语义。上述给出了事例,a+b和临时对象就是右值,右值只能出现在右边,这里的complex类和string类是由C++作者写的,引入了不同的修改和赋值,没有遵守右值的定义,所以它们的事例没有报错。方便记忆,可以这里理解右值和左值,可以取地址,有名字的是左值,而不能取地址,没有名字的是右值。还有一种解释,右值由将亡值和纯右值组成,

2021-02-08 17:06:51 157

原创 GUNC2.9分配器

以下内容来自侯捷老师的C++内存管理视频课程GNUC2.9二级分配器 代码//----------------------------------------------//第二級配置器//----------------------------------------------enum{ __ALIGN = 8}; //小區塊的上調邊界enum{ __MAX_BYTES = 128 }; //小區塊的上限enum{ __NFREELIS

2021-02-06 11:16:57 205 1

原创 static allocator

#include <iostream>using namespace std;namespace jj09{ class allocator { private: struct obj { struct obj *next; //embedded pointer }; public: void *allocate(size_t); void dea.

2021-02-05 16:45:52 120 2

原创 Per-class allocator

#include <iostream>using namespace std;namespace jj04{ //ref. C++Primer 3/e, p.765 //per-class allocator class Screen { public: Screen(int x) : i(x){}; int get() { return i; } void *operator new(size.

2021-02-05 16:04:52 147

原创 ROS安装

ROS安装在ubuntu18.04上安装ros\安装准备sudo apt-get updatesudo apt-get upgrade添加ROS的镜像源sudo sh -c '. /etc/lsb-release && echo "deb http://mirrors.ustc.edu.cn/ros/ubuntu/ `lsb_release -cs` main" > /etc/apt/sources.list.d/ros-latest.list'配置密钥sudo a

2021-02-02 21:13:35 249

原创 C++ 多线程

C++ 多线程简单例程#include <iostream>#include <thread>#include <unistd.h>#include <string>void func1(){ std::cout<<"test"<<std::endl;}void func2(std::string str){ std::cout<<str<<std::endl; }

2021-02-01 22:45:03 136

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除