]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - jacinto-ai/caffe-jacinto.git/blob - src/caffe/proto/caffe.proto
misc update
[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   // Optionally, the datum could also hold float data.
22   repeated float float_data = 6;
23 }
25 message FillerParameter {
26   // The filler type.
27   optional string type = 1 [default = 'constant'];
28   optional float value = 2 [default = 0]; // the value in constant filler
29   optional float min = 3 [default = 0]; // the min value in uniform filler
30   optional float max = 4 [default = 1]; // the max value in uniform filler
31   optional float mean = 5 [default = 0]; // the mean value in gaussian filler
32   optional float std = 6 [default = 1]; // the std value in gaussian filler
33 }
35 message LayerParameter {
36   optional string name = 1; // the layer name
37   optional string type = 2; // the string to specify the layer type
39   // Parameters to specify layers with inner products.
40   optional uint32 num_output = 3; // The number of outputs for the layer
41   optional bool biasterm = 4 [default = true]; // whether to have bias terms
42   optional FillerParameter weight_filler = 5; // The filler for the weight
43   optional FillerParameter bias_filler = 6; // The filler for the bias
45   optional uint32 pad = 7 [default = 0]; // The padding size
46   optional uint32 kernelsize = 8; // The kernel size
47   optional uint32 group = 9 [default = 1]; // The group size for group conv
48   optional uint32 stride = 10 [default = 1]; // The stride
49   enum PoolMethod {
50     MAX = 0;
51     AVE = 1;
52   }
53   optional PoolMethod pool = 11 [default = MAX]; // The pooling method
54   optional float dropout_ratio = 12 [default = 0.5]; // dropout ratio
56   optional uint32 local_size = 13 [default = 5]; // for local response norm
57   optional float alpha = 14 [default = 1.]; // for local response norm
58   optional float beta = 15 [default = 0.75]; // for local response norm
60   // For data layers, specify the data source
61   optional string source = 16;
62   // For data pre-processing, we can do simple scaling and constant subtraction
63   optional float scale = 17 [ default = 1 ];
64   optional float subtraction = 18 [ default = 0 ];
65   // For data layers, specify the batch size.
66   optional uint32 batchsize = 19;
67   // For data layers, specify if we would like to randomly crop an image.
68   optional uint32 cropsize = 20 [default = 0];
69   // For data layers, specify if we want to randomly mirror data.
70   optional bool mirror = 21 [default = false];
72   // The blobs containing the numeric parameters of the layer
73   repeated BlobProto blobs = 50;
74 }
76 message LayerConnection {
77   optional LayerParameter layer = 1; // the layer parameter
78   repeated string bottom = 2; // the name of the bottom blobs
79   repeated string top = 3; // the name of the top blobs
80 }
82 message NetParameter {
83   optional string name = 1; // consider giving the network a name
84   repeated LayerConnection layers = 2; // a bunch of layers.
85   repeated string input = 3; // The input to the network
86 }
88 message SolverParameter {
89   optional float base_lr = 1; // The base learning rate
90   // the number of iterations between displaying info. If display = 0, no info
91   // will be displayed.
92   optional int32 display = 2;
93   optional int32 max_iter = 3; // the maximum number of iterations
94   optional int32 snapshot = 4 [default = 0]; // The snapshot interval
95   optional string lr_policy = 5; // The learning rate decay policy.
96   optional float min_lr = 6 [default = 0]; // The mininum learning rate
97   optional float max_lr = 7 [default = 1e10]; // The maximum learning rate
98   optional float gamma = 8; // The parameter to compute the learning rate.
99   optional float power = 9; // The parameter to compute the learning rate.
100   optional float momentum = 10; // The momentum value.
101   optional float weight_decay = 11; // The weight decay.
102   optional float stepsize = 12; // the stepsize for learning rate policy "step"
104   optional string snapshot_prefix = 13; // The prefix for the snapshot.