@@ -11,7 +11,7 @@ distributed under the License is distributed on an "AS IS" BASIS,
1111WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212See the License for the specific language governing permissions and
1313limitations under the License. */
14- ifdef ( `proto3' , ` syntax = "proto2";' )
14+ syntax = "proto2" ;
1515
1616import "ParameterConfig.proto" ;
1717
@@ -20,7 +20,7 @@ package paddle;
2020/**
2121 * Various structs for the configuration of a neural network
2222 */
23- sinclude ( `ModelConfigExt.proto.m4' )
23+
2424
2525message ExternalConfig {
2626 repeated string layer_names = 1 ;
@@ -146,8 +146,8 @@ message NormConfig {
146146
147147 // the parameters for normalization
148148 // u = u / (1+scale*sum(u^2 in window))^pow
149- required real scale = 4;
150- required real pow = 5;
149+ required double scale = 4 ;
150+ required double pow = 5 ;
151151
152152 // The size of output feature map.
153153 required uint32 output_x = 6 ;
@@ -223,7 +223,7 @@ message OperatorConfig {
223223 required uint64 output_size = 4 ;
224224
225225 // For DotMulOperator
226- optional real dotmul_scale = 5 [ default = 1.0] ;
226+ optional double dotmul_scale = 5 [default = 1.0 ];
227227
228228 // For ConvOperator
229229 optional ConvConfig conv_conf = 6 ;
@@ -266,7 +266,7 @@ message LayerInputConfig {
266266}
267267
268268message LayerConfig {
269- sinclude ( `ModelConfigLayer.proto.m4' )
269+
270270 required string name = 1 ;
271271 required string type = 2 ;
272272 optional uint64 size = 3 ;
@@ -293,7 +293,7 @@ sinclude(`ModelConfigLayer.proto.m4')
293293 optional uint32 partial_sum = 9 ;
294294
295295 // for dropout
296- optional real drop_rate = 10;
296+ optional double drop_rate = 10 ;
297297
298298 // for HierarchicalSoftmaxLayer and NCELayer
299299 // the number of classes
@@ -317,17 +317,17 @@ sinclude(`ModelConfigLayer.proto.m4')
317317 // For NCELayer
318318 // The distribution for generating the random negative labels.
319319 // A uniform distribution will be used if not provided
320- repeated real neg_sampling_dist = 17 [ packed = true] ;
320+ repeated double neg_sampling_dist = 17 [packed = true ];
321321
322322 // For MaxLayer
323323 // default: output VALUE of MaxLayer. set this flag to true for output INDEX
324- // INDEX will be put in Argument::value as real values.
324+ // INDEX will be put in Argument::value as double values.
325325 optional bool output_max_index = 19 [default = false ];
326326
327327 /// The filed number 20 have been deprecated.
328328
329329 // For self-normalized estimation
330- optional real softmax_selfnorm_alpha = 21 [ default = 0.1] ;
330+ optional double softmax_selfnorm_alpha = 21 [default = 0.1 ];
331331
332332 /// The filed numbers 22 and 23 have been deprecated.
333333
@@ -338,14 +338,14 @@ sinclude(`ModelConfigLayer.proto.m4')
338338 optional bool norm_by_times = 25 ;
339339
340340 // for CostLayers
341- optional real coeff = 26 [ default = 1.0] ;
341+ optional double coeff = 26 [default = 1.0 ];
342342
343343 // for AverageLayer
344344 // can be set to: 'average', 'sum' or 'squarerootn'
345345 optional string average_strategy = 27 ;
346346
347347 // for error clipping
348- optional real error_clipping_threshold = 28 [ default = 0.0] ;
348+ optional double error_clipping_threshold = 28 [default = 0.0 ];
349349
350350 // for operators used by mixed layer
351351 repeated OperatorConfig operator_confs = 29 ;
@@ -355,11 +355,11 @@ sinclude(`ModelConfigLayer.proto.m4')
355355 optional int32 max_sort_size = 31 ;
356356
357357 // for SlopeInterceptLayer
358- optional real slope = 32;
359- optional real intercept = 33;
358+ optional double slope = 32 ;
359+ optional double intercept = 33 ;
360360
361361 // for CosSimVecMatLayer and CosSimLayer
362- optional real cos_scale = 34;
362+ optional double cos_scale = 34 ;
363363
364364 // for DataNormLayer
365365 // can be set to: 'z-score', 'min-max' or 'decimal-scaling'
@@ -394,7 +394,7 @@ sinclude(`ModelConfigLayer.proto.m4')
394394 // if number of the selected columns is less than
395395 // sample number * selective_fc output size * selective_fc_mull_mull_ratio
396396 // sparse multiplication is used, otherwise, using full multiplication.
397- optional real selective_fc_full_mul_ratio = 44 [ default = 0.02] ;
397+ optional double selective_fc_full_mul_ratio = 44 [default = 0.02 ];
398398
399399 // to indicate how many threads selective_fc use to to accelate
400400 // the plain_mul period
@@ -406,7 +406,7 @@ sinclude(`ModelConfigLayer.proto.m4')
406406 optional bool use_global_stats = 46 ;
407407
408408 // use to compute moving mean and variance.
409- optional real moving_average_fraction = 47 [ default = 0.9] ;
409+ optional double moving_average_fraction = 47 [default = 0.9 ];
410410
411411 // bias size
412412 optional uint32 bias_size = 48 [default = 0 ];
@@ -438,7 +438,7 @@ message EvaluatorConfig {
438438
439439 // Used by PrecisionRecallEvaluator and ClassificationErrorEvaluator
440440 // For multi binary labels: true if output > classification_threshold
441- optional real classification_threshold = 6 [ default = 0.5] ;
441+ optional double classification_threshold = 6 [default = 0.5 ];
442442 // The positive label. -1 means average precision and recall
443443 optional int32 positive_label = 7 [default = -1 ];
444444
0 commit comments