From b9257396d6548a67dd6e9ecade25970187fe6e03 Mon Sep 17 00:00:00 2001 From: Alejandro Dubrovsky Date: Wed, 22 Jan 2014 22:56:57 +1100 Subject: [PATCH] mean_bound and sample_mean need referencing with this --- src/caffe/test/test_random_number_generator.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/caffe/test/test_random_number_generator.cpp b/src/caffe/test/test_random_number_generator.cpp index 4c3358f..26c9f2e 100644 --- a/src/caffe/test/test_random_number_generator.cpp +++ b/src/caffe/test/test_random_number_generator.cpp @@ -43,8 +43,8 @@ TYPED_TEST(RandomNumberGeneratorTest, TestRngGaussian) { caffe_vRngGaussian(sample_size, (TypeParam*)data_a.mutable_cpu_data(), mu, sigma); TypeParam true_mean = mu; TypeParam true_std = sigma; - TypeParam bound = mean_bound(true_std, sample_size); - TypeParam real_mean = sample_mean((TypeParam*)data_a.cpu_data(), sample_size); + TypeParam bound = this->mean_bound(true_std, sample_size); + TypeParam real_mean = this->sample_mean((TypeParam*)data_a.cpu_data(), sample_size); EXPECT_NEAR(real_mean, true_mean, bound); } @@ -57,8 +57,8 @@ TYPED_TEST(RandomNumberGeneratorTest, TestRngUniform) { caffe_vRngUniform(sample_size, (TypeParam*)data_a.mutable_cpu_data(), lower, upper); TypeParam true_mean = (lower + upper) / 2; TypeParam true_std = (upper - lower) / sqrt(12); - TypeParam bound = mean_bound(true_std, sample_size); - TypeParam real_mean = sample_mean((TypeParam*)data_a.cpu_data(), sample_size); + TypeParam bound = this->mean_bound(true_std, sample_size); + TypeParam real_mean = this->sample_mean((TypeParam*)data_a.cpu_data(), sample_size); EXPECT_NEAR(real_mean, true_mean, bound); } -- 2.7.4