ImageVerifierCode 换一换
格式:DOCX , 页数:19 ,大小:24.56KB ,
资源ID:5654418      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/5654418.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(caffe源码解析caffeproto.docx)为本站会员(b****5)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

caffe源码解析caffeproto.docx

1、caffe源码解析 caffeproto要看caffe源码,首先应该看的就是caffe.proto。它位于srccaffeproto目录下,在这个文件夹下还有一个.pb.cc和一个.pb.h文件,这两个文件都是由caffe.proto编译而来的。在caffe.proto中定义了很多结构化数据,包括: BlobProto Datum FillerParameter NetParameter SolverParameter SolverState LayerParameter ConcatParameter ConvolutionParameter DataParameter DropoutPar

2、ameter HDF5DataParameter HDF5OutputParameter ImageDataParameter InfogainLossParameter InnerProductParameter LRNParameter MemoryDataParameter PoolingParameter PowerParameter WindowDataParameter V0LayerParametercaffe.proto中的几个重要数据类型caffe.pb.cc里面的东西都是从caffe.proto编译而来的,无非就是一些关于这些数据结构(类)的标准化操作,比如 void Co

3、pyFrom(); void MergeFrom(); void Clear(); bool IsInitialized() const; int ByteSize() const; bool MergePartialFromCodedStream(); void SerializeWithCachedSizes() const; SerializeWithCachedSizesToArray() const; int GetCachedSize() void SharedCtor(); void SharedDtor(); void SetCachedSize() const; BlobPr

4、otomessage BlobProto /blob的属性以及blob中的数据(datadiff) optional int32 num = 1 default = 0; optional int32 channels = 2 default = 0; optional int32 height = 3 default = 0; optional int32 width = 4 default = 0; repeated float data = 5 packed = true; repeated float diff = 6 packed = true; Datum message Datu

5、m optional int32 channels = 1; optional int32 height = 2; optional int32 width = 3; optional bytes data = 4;/真实的图像数据,以字节存储(bytes) optional int32 label = 5; repeated float float_data = 6;/datum也能存float类型的数据(float) LayerParametermessage LayerParameter repeated string bottom = 2; /输入的blob的名字(string) re

6、peated string top = 3; /输出的blob的名字(string) optional string name = 4; /层的名字 enum LayerType /层的枚举(enum,和c+中的enum一样) NONE = 0; ACCURACY = 1; BNLL = 2; CONCAT = 3; CONVOLUTION = 4; DATA = 5; DROPOUT = 6; EUCLIDEAN_LOSS = 7; ELTWISE_PRODUCT = 25; FLATTEN = 8; HDF5_DATA = 9; HDF5_OUTPUT = 10; HINGE_LOSS =

7、 28; IM2COL = 11; IMAGE_DATA = 12; INFOGAIN_LOSS = 13; INNER_PRODUCT = 14; LRN = 15; MEMORY_DATA = 29; MULTINOMIAL_LOGISTIC_LOSS = 16; POOLING = 17; POWER = 26; RELU = 18; SIGMOID = 19; SIGMOID_CROSS_ENTROPY_LOSS = 27; SOFTMAX = 20; SOFTMAX_LOSS = 21; SPLIT = 22; TANH = 23; WINDOW_DATA = 24; optiona

8、l LayerType type = 5; / 层的类型 repeated BlobProto blobs = 6; /blobs的数值参数 repeated float blobs_lr = 7; /学习速率(repeated),如果你想设置一个blob的学习速率,你需要设置所有blob的学习速率。 repeated float weight_decay = 8; /权值衰减(repeated) / 相对于某一特定层的参数(optional) optional ConcatParameter concat_param = 9; optional ConvolutionParameter co

9、nvolution_param = 10; optional DataParameter data_param = 11; optional DropoutParameter dropout_param = 12; optional HDF5DataParameter hdf5_data_param = 13; optional HDF5OutputParameter hdf5_output_param = 14; optional ImageDataParameter image_data_param = 15; optional InfogainLossParameter infogain

10、_loss_param = 16; optional InnerProductParameter inner_product_param = 17; optional LRNParameter lrn_param = 18; optional MemoryDataParameter memory_data_param = 22; optional PoolingParameter pooling_param = 19; optional PowerParameter power_param = 21; optional WindowDataParameter window_data_param

11、 = 20; optional V0LayerParameter layer = 1; NetParametermessage NetParameter optional string name = 1;/网络的名字 repeated LayerParameter layers = 2; /repeated类似于数组 repeated string input = 3;/输入层blob的名字 repeated int32 input_dim = 4;/输入层blob的维度,应该等于(4*#input) optional bool force_backward = 5 default = fal

12、se;/网络是否进行反向传播。如果设置为否,则由网络的结构和学习速率来决定是否进行反向传播。 SolverParametermessage SolverParameter optional string train_net = 1; / 训练网络的proto file optional string test_net = 2; / 测试网络的proto file optional int32 test_iter = 3 default = 0; / 每次测试时的迭代次数 optional int32 test_interval = 4 default = 0; / 两次测试的间隔迭代次数 op

13、tional bool test_compute_loss = 19 default = false; optional float base_lr = 5; / 基本学习率 optional int32 display = 6; / 两次显示的间隔迭代次数 optional int32 max_iter = 7; / 最大迭代次数 optional string lr_policy = 8; / 学习速率衰减方式 optional float gamma = 9; / 关于梯度下降的一个参数 optional float power = 10; / 计算学习率的一个参数 optional f

14、loat momentum = 11; / 动量 optional float weight_decay = 12; / 权值衰减 optional int32 stepsize = 13; / 学习速率的衰减步长 optional int32 snapshot = 14 default = 0; / snapshot的间隔 optional string snapshot_prefix = 15; / snapshot的前缀 optional bool snapshot_diff = 16 default = false; / 是否对于 diff 进行 snapshot enum Solve

15、rMode CPU = 0; GPU = 1; optional SolverMode solver_mode = 17 default = GPU; / solver的模式,默认为GPU optional int32 device_id = 18 default = 0; / GPU的ID optional int64 random_seed = 20 default = -1; / 随机数种子caffe.proto源码/ Copyright 2014 BVLC and contributors.package caffe;message BlobProto optional int32 n

16、um = 1 default = 0; optional int32 channels = 2 default = 0; optional int32 height = 3 default = 0; optional int32 width = 4 default = 0; repeated float data = 5 packed = true; repeated float diff = 6 packed = true;/ The BlobProtoVector is simply a way to pass multiple blobproto instances/ around.me

17、ssage BlobProtoVector repeated BlobProto blobs = 1;message Datum optional int32 channels = 1; optional int32 height = 2; optional int32 width = 3; / the actual image data, in bytes optional bytes data = 4; optional int32 label = 5; / Optionally, the datum could also hold float data. repeated float f

18、loat_data = 6;message FillerParameter / The filler type. optional string type = 1 default = constant; optional float value = 2 default = 0; / the value in constant filler optional float min = 3 default = 0; / the min value in uniform filler optional float max = 4 default = 1; / the max value in unif

19、orm filler optional float mean = 5 default = 0; / the mean value in Gaussian filler optional float std = 6 default = 1; / the std value in Gaussian filler / The expected number of non-zero input weights for a given output in / Gaussian filler - the default -1 means dont perform sparsification. optio

20、nal int32 sparse = 7 default = -1;message NetParameter optional string name = 1; / consider giving the network a name repeated LayerParameter layers = 2; / a bunch of layers. / The input blobs to the network. repeated string input = 3; / The dim of the input blobs. For each input blob there should b

21、e four / values specifying the num, channels, height and width of the input blob. / Thus, there should be a total of (4 * #input) numbers. repeated int32 input_dim = 4; / Whether the network will force every layer to carry out backward operation. / If set False, then whether to carry out backward is

22、 determined / automatically according to the net structure and learning rates. optional bool force_backward = 5 default = false;message SolverParameter optional string train_net = 1; / The proto file for the training net. optional string test_net = 2; / The proto file for the testing net. / The numb

23、er of iterations for each testing phase. optional int32 test_iter = 3 default = 0; / The number of iterations between two testing phases. optional int32 test_interval = 4 default = 0; optional bool test_compute_loss = 19 default = false; optional float base_lr = 5; / The base learning rate / the num

24、ber of iterations between displaying info. If display = 0, no info / will be displayed. optional int32 display = 6; optional int32 max_iter = 7; / the maximum number of iterations optional string lr_policy = 8; / The learning rate decay policy. optional float gamma = 9; / The parameter to compute th

25、e learning rate. optional float power = 10; / The parameter to compute the learning rate. optional float momentum = 11; / The momentum value. optional float weight_decay = 12; / The weight decay. optional int32 stepsize = 13; / the stepsize for learning rate policy step optional int32 snapshot = 14

26、default = 0; / The snapshot interval optional string snapshot_prefix = 15; / The prefix for the snapshot. / whether to snapshot diff in the results or not. Snapshotting diff will help / debugging but the final protocol buffer size will be much larger. optional bool snapshot_diff = 16 default = false

27、; / the mode solver will use: 0 for CPU and 1 for GPU. Use GPU in default. enum SolverMode CPU = 0; GPU = 1; optional SolverMode solver_mode = 17 default = GPU; / the device_id will that be used in GPU mode. Use device_id = 0 in default. optional int32 device_id = 18 default = 0; / If non-negative,

28、the seed with which the Solver will initialize the Caffe / random number generator - useful for reproducible results. Otherwise, / (and by default) initialize using a seed derived from the system clock. optional int64 random_seed = 20 default = -1;/ A message that stores the solver snapshotsmessage

29、SolverState optional int32 iter = 1; / The current iteration optional string learned_net = 2; / The file that stores the learned net. repeated BlobProto history = 3; / The history for sgd solvers/ Update the next available ID when you add a new LayerParameter field./ LayerParameter next available ID

30、: 23 (last added: memory_data_param)message LayerParameter repeated string bottom = 2; / the name of the bottom blobs repeated string top = 3; / the name of the top blobs optional string name = 4; / the layer name / Add new LayerTypes to the enum below in lexicographical order (other than / starting with NONE), starting with the next available ID in the comment / line above the enum. Update the next available ID when you add a new / LayerType. / / LayerType next available ID: 30 (last added: MEMORY_DATA)

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1