]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - jacinto-ai/caffe-jacinto.git/blob - src/caffe/proto/caffe.proto
732c2eecfda153dbf111d0c573de4e2aa7544078
[jacinto-ai/caffe-jacinto.git] / src / caffe / proto / caffe.proto
1 // Copyright 2013 Yangqing Jia
3 package caffe;
5 message BlobProto {
6   optional int32 num = 1 [default = 0];
7   optional int32 channels = 2 [default = 0];
8   optional int32 height = 3 [default = 0];
9   optional int32 width = 4 [default = 0];
10   repeated float data = 5 [packed=true];
11   repeated float diff = 6 [packed=true];
12 }
14 message Datum {
15   optional int32 channels = 1;
16   optional int32 height = 2;
17   optional int32 width = 3;
18   // the actual image data, in bytes
19   optional bytes data = 4;
20   optional int32 label = 5;
21 }
23 message FillerParameter {
24   // The filler type. In default we will set it to Gaussian for easy
25   // debugging.
26   optional string type = 1 [default = 'gaussian'];
27   optional float value = 2 [default = 0]; // the value in constant filler
28   optional float min = 3 [default = 0]; // the min value in uniform filler
29   optional float max = 4 [default = 1]; // the max value in uniform filler
30   optional float mean = 5 [default = 0]; // the mean value in gaussian filler
31   optional float std = 6 [default = 1]; // the std value in gaussian filler
32 }
34 message LayerParameter {
35   optional string name = 1; // the layer name
36   optional string type = 2; // the string to specify the layer type
38   // Parameters to specify layers with inner products.
39   optional uint32 num_output = 3; // The number of outputs for the layer
40   optional bool biasterm = 4 [default = true]; // whether to have bias terms
41   optional FillerParameter weight_filler = 5; // The filler for the weight
42   optional FillerParameter bias_filler = 6; // The filler for the bias
44   optional uint32 pad = 7 [default = 0]; // The padding size
45   optional uint32 kernelsize = 8; // The kernel size
46   optional uint32 group = 9 [default = 1]; // The group size for group conv
47   optional uint32 stride = 10 [default = 1]; // The stride
48   enum PoolMethod {
49     MAX = 0;
50     AVE = 1;
51   }
52   optional PoolMethod pool = 11 [default = MAX]; // The pooling method
53   optional float dropout_ratio = 12 [default = 0.5]; // dropout ratio
55   optional uint32 local_size = 13 [default = 5]; // for local response norm
56   optional float alpha = 14 [default = 1.]; // for local response norm
57   optional float beta = 15 [default = 0.75]; // for local response norm
59   // For data layers, specify the data source
60   optional string source = 16;
61   // For datay layers, specify the batch size.
62   optional uint32 batchsize = 17;
64   // The blobs containing the numeric parameters of the layer
65   repeated BlobProto blobs = 50;
66 }
68 message LayerConnection {
69   optional LayerParameter layer = 1; // the layer parameter
70   repeated string bottom = 2; // the name of the bottom blobs
71   repeated string top = 3; // the name of the top blobs
72 }
74 message NetParameter {
75   optional string name = 1; // consider giving the network a name
76   repeated LayerConnection layers = 2; // a bunch of layers.
77   repeated string bottom = 3; // The input to the network
78   repeated string top = 4; // The output of the network.
79 }
81 message SolverParameter {
82   optional float base_lr = 1; // The base learning rate
83   optional int32 display = 2; // display options. 0 = no display
84   optional int32 max_iter = 3; // the maximum number of iterations
85   optional int32 snapshot = 4; // The snapshot interval
86   optional string lr_policy = 5; // The learning rate decay policy.
87   optional float min_lr = 6 [default = 0]; // The mininum learning rate
88   optional float max_lr = 7 [default = 1e10]; // The maximum learning rate
89   optional float gamma = 8; // The parameter to compute the learning rate.
90   optional float power = 9; // The parameter to compute the learning rate.
91   optional float momentum = 10; // The momentum value.
92 }