caffe自定义layer
caffe自带layers:
http://caffe.berkeleyvision.org/tutorial/layers.html
Layers:
- Image Data - read raw images.
- Database - read data from LEVELDB or LMDB.
- HDF5 Input - read HDF5 data, allows data of arbitrary dimensions.
- HDF5 Output - write data as HDF5.
- Input - typically used for networks that are being deployed.
- Window Data - read window data file.
- Memory Data - read data directly from memory.
- Dummy Data - for static data and debugging.
Note that the Python Layer can be useful for create custom data layers.
自定义caffe layers:
https://chrischoy.github.io/research/making-caffe-layer/
模型文件的参数在/src/caffe/proto/caffe.proto中,caffe.proto文件编译后以.h文件的方式被include/caffe/zss_layers.hpp引用,如下:
protobuf:
https://developers.google.com/protocol-buffers/docs/cpptutorial
syntax = "proto2";
package tutorial;
message Person {
required string name = 1;
required int32 id = 2;
optional string email = 3;
enum PhoneType {
MOBILE = 0;
HOME = 1;
WORK = 2;
}
message PhoneNumber {
required string number = 1;
optional PhoneType type = 2 [default = HOME];
}
repeated PhoneNumber phones = 4;
}
message AddressBook {
repeated Person people = 1;
}
1、2、16、3、4表示变量的编码,编码为1-15的比编码大于16的变量存储时少用1个字节的空间,因此使用频率较高的变量应当给予1-15的编码
required——慎用
optional——可以赋默认值
repeated——长度不固定,可以用来存动态数组之类的
源码阅读过程中遇到的一些c++知识:
1、explicit关键字,禁止构造函数隐式转换
https://blog.csdn.net/qq_35524916/article/details/58178072
2、在类、对象之后的 . :: : ->的作用
https://blog.csdn.net/k_koris/article/details/80469956
3、函数后:的作用——构造函数初始化列表
http://www.cnblogs.com/BlueTzar/articles/1223169.html
4、c++模板
template <class identifier> function_declaration;
template <typename identifier> function_declaration;
https://blog.csdn.net/qq_35637562/article/details/55194097
caffe自定义layer的更多相关文章
- iOS开发UI篇—CAlayer(自定义layer)
iOS开发UI篇—CAlayer(自定义layer) 一.第一种方式 1.简单说明 以前想要在view中画东西,需要自定义view,创建一个类与之关联,让这个类继承自UIView,然后重写它的Draw ...
- iOS 自定义layer的两种方式
在iOS中,你能看得见摸得着的东西基本都是UIView,比如一个按钮,一个标签,一个文本输入框,这些都是UIView: 其实UIView之所以能显示在屏幕上,完全是因为它内部的一个图层 在创建UIVi ...
- Caffe中Layer注册机制
Caffe内部维护一个注册表用于查找特定Layer对应的工厂函数(Layer Factory的设计用到了设计模式里的工厂模式).Caffe的Layer注册表是一组键值对(key, value)( La ...
- IOS 自定义Layer(图层)
方式1: @interface NJViewController () @end @implementation NJViewController - (void)viewDidLoad { [sup ...
- iOS开发UI篇—自定义layer
一.第一种方式 1.简单说明 以前想要在view中画东西,需要自定义view,创建一个类与之关联,让这个类继承自UIView,然后重写它的DrawRect:方法,然后在该方法中画图. 绘制图形的步骤: ...
- 自定义 Layer 属性的动画
默认情况下,CALayer 及其子类的绝大部分标准属性都可以执行动画,无论是添加一个 CAAnimation 到 Layer(显式动画),亦或是为属性指定一个动作然后修改它(隐式动画). 但有时候 ...
- keras中自定义Layer
最近在学习SSD的源码,其中有两个自定的层,特此学习一下并记录. import keras.backend as K from keras.engine.topology import InputSp ...
- Caffe学习--Layer分析
Caffe_Layer 1.基本数据结构 //Layer层主要的的参数 LayerParamter layer_param_; // protobuf内的layer参数 vector<share ...
- 转caffe scale layer
版权声明:本文为博主原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明. 本文链接:https://blog.csdn.net/u011681952/article/det ...
随机推荐
- [svc][bg]phabricator-zh_CN汉化包
汉化phabricator审计系统 主要是用来审计一些开发bug的,客服会提交一些bug,测试也会提交一些bug给开发. https://github.com/wanthings/phabricato ...
- makefile之目录搜索&自动依赖
目录搜索 在一个大工程中,一般会将源文件和中间生成文件放在不同的目录,而且不会污染源码所在的目录.当需要编译不同目录下的源文件时,就需要指定路径,那么怎样让路径的表示以及源文件的引用更加灵活.就要用到 ...
- neo4j使用笔记
#coding:utf- __author__ = 'similarface' # 安装驱动:pip install neo4j-driver from neo4j.v1 import GraphDa ...
- 关于dbutils中QueryRunner看批量删除语句batch
//批量删除 public void delBooks(String[] ids) throws SQLException { QueryRunner qr = new QueryRunner(C3P ...
- linux TZ格式
man tzset可以很清楚了解时区设置格式,共3种: The first format is used when there is no daylight saving time in the lo ...
- C++ 4种强制类型转换
C++的四种强制类型转换为:static_cast.const_cast.reinterpret_cast和dynamic_cast 类型转换的一般形式:cast-name(expression); ...
- Ant Design Pro快速入门
在上一篇文章中,我们介绍了如何构建一个Ant Design Pro的环境. 同时讲解了如何启动服务并查看前端页面功能. 在本文中,我们将简单讲解如何在Ant Design Pro框架下实现自己的业务功 ...
- Storm系统架构以及代码结构学习
转自:http://blog.csdn.net/androidlushangderen/article/details/45955833 storm学习系列:http://blog.csdn.net/ ...
- Spring中HttpInvoker远程方法调用总结
Spring为各种远程訪问技术的集成提供了工具类.Spring远程支持是由普通(Spring)POJO实现的,这使得开发具有远程訪问功能的服务变得相当easy. 眼下,Spring支持四种远程技术: ...
- ubuntu14.04安装vmware workstation
0) Do the basic system installation of Ubuntu 14.04 LTS (Server or Desktop) 1) wget the installer wg ...