Add parameter for AccuracyLayer in proto.
authorRob Hess <hess@yahoo-inc.com>
Sat, 14 Jun 2014 01:16:04 +0000 (18:16 -0700)
committerRob Hess <hess@yahoo-inc.com>
Fri, 27 Jun 2014 18:17:46 +0000 (11:17 -0700)
src/caffe/proto/caffe.proto

index fd71f45..48d6fe2 100644 (file)
@@ -188,6 +188,7 @@ message LayerParameter {
   // The weight decay that is multiplied on the global weight decay.
   repeated float weight_decay = 8;
 
+  optional AccuracyParameter accuracy_param = 27;
   optional ArgMaxParameter argmax_param = 23;
   optional ConcatParameter concat_param = 9;
   optional ConvolutionParameter convolution_param = 10;
@@ -214,6 +215,14 @@ message LayerParameter {
   optional V0LayerParameter layer = 1;
 }
 
+// Message that stores parameters used by AccuracyLayer
+message AccuracyParameter {
+  // When computing accuracy, count as correct by comparing the true label to
+  // the top k scoring classes.  By default, only compare to the top scoring
+  // class (i.e. argmax).
+  optional uint32 compare_to_top_k = 1 [default = 1];
+}
+
 // Message that stores parameters used by ArgMaxLayer
 message ArgMaxParameter {
   // If true produce pairs (argmax, maxval)