Fix typo in test_threshold ThresholdParameter
authorSergio Guadarrama <sguada@gmail.com>
Fri, 16 May 2014 01:47:57 +0000 (18:47 -0700)
committerSergio <sguada@gmail.com>
Tue, 27 May 2014 17:32:23 +0000 (10:32 -0700)
src/caffe/test/test_threshold_layer.cpp

index 6232d0c..25e9f02 100644 (file)
@@ -72,7 +72,7 @@ TYPED_TEST(ThresholdLayerTest, TestCPU) {
 TYPED_TEST(ThresholdLayerTest, TestCPU2) {
   LayerParameter layer_param;
   Caffe::set_mode(Caffe::CPU);
-  ThresholdLayerParameter* threshold_param =
+  ThresholdParameter* threshold_param =
     layer_param.mutable_threshold_param();
   threshold_param->set_threshold(0.5);
   ThresholdLayer<TypeParam> layer(layer_param);
@@ -82,6 +82,7 @@ TYPED_TEST(ThresholdLayerTest, TestCPU2) {
   const TypeParam* bottom_data = this->blob_bottom_->cpu_data();
   const TypeParam* top_data = this->blob_top_->cpu_data();
   const TypeParam threshold_ = layer_param.threshold_param().threshold();
+  EXPECT_FLOAT_EQ(threshold_,0.5);
   for (int i = 0; i < this->blob_bottom_->count(); ++i) {
     EXPECT_GE(top_data[i], 0.);
     EXPECT_LE(top_data[i], 1.);