From 88472c9b173f9885af192d8b78ebf9b18b89dee5 Mon Sep 17 00:00:00 2001 From: Jonathan L Long Date: Wed, 11 Jun 2014 19:31:40 -0700 Subject: [PATCH] remove unused variables from tests --- src/caffe/test/test_hdf5data_layer.cpp | 1 - src/caffe/test/test_lrn_layer.cpp | 1 - src/caffe/test/test_neuron_layer.cpp | 2 -- src/caffe/test/test_sigmoid_cross_entropy_loss_layer.cpp | 1 - src/gtest/gtest-all.cpp | 1 - 5 files changed, 6 deletions(-) diff --git a/src/caffe/test/test_hdf5data_layer.cpp b/src/caffe/test/test_hdf5data_layer.cpp index dd2027c..1cbca00 100644 --- a/src/caffe/test/test_hdf5data_layer.cpp +++ b/src/caffe/test/test_hdf5data_layer.cpp @@ -61,7 +61,6 @@ TYPED_TEST(HDF5DataLayerTest, TestRead) { int batch_size = 5; hdf5_data_param->set_batch_size(batch_size); hdf5_data_param->set_source(*(this->filename)); - int num_rows = 10; int num_cols = 8; int height = 5; int width = 5; diff --git a/src/caffe/test/test_lrn_layer.cpp b/src/caffe/test/test_lrn_layer.cpp index 47c46ee..7f0a211 100644 --- a/src/caffe/test/test_lrn_layer.cpp +++ b/src/caffe/test/test_lrn_layer.cpp @@ -55,7 +55,6 @@ void LRNLayerTest::ReferenceLRNForward( Blob* blob_top) { blob_top->Reshape(blob_bottom.num(), blob_bottom.channels(), blob_bottom.height(), blob_bottom.width()); - const Dtype* bottom_data = blob_bottom.cpu_data(); Dtype* top_data = blob_top->mutable_cpu_data(); LRNParameter lrn_param = layer_param.lrn_param(); Dtype alpha = lrn_param.alpha(); diff --git a/src/caffe/test/test_neuron_layer.cpp b/src/caffe/test/test_neuron_layer.cpp index 2210b46..ca70e1a 100644 --- a/src/caffe/test/test_neuron_layer.cpp +++ b/src/caffe/test/test_neuron_layer.cpp @@ -189,7 +189,6 @@ TYPED_TEST(NeuronLayerTest, TestDropoutCPUTestPhase) { // Now, check values const TypeParam* bottom_data = this->blob_bottom_->cpu_data(); const TypeParam* top_data = this->blob_top_->cpu_data(); - float scale = 1. / (1. - layer_param.dropout_param().dropout_ratio()); for (int i = 0; i < this->blob_bottom_->count(); ++i) { if (top_data[i] != 0) { EXPECT_EQ(top_data[i], bottom_data[i]); @@ -244,7 +243,6 @@ TYPED_TEST(NeuronLayerTest, TestDropoutGPUTestPhase) { // Now, check values const TypeParam* bottom_data = this->blob_bottom_->cpu_data(); const TypeParam* top_data = this->blob_top_->cpu_data(); - float scale = 1. / (1. - layer_param.dropout_param().dropout_ratio()); for (int i = 0; i < this->blob_bottom_->count(); ++i) { if (top_data[i] != 0) { EXPECT_EQ(top_data[i], bottom_data[i]); diff --git a/src/caffe/test/test_sigmoid_cross_entropy_loss_layer.cpp b/src/caffe/test/test_sigmoid_cross_entropy_loss_layer.cpp index d8018be..089d595 100644 --- a/src/caffe/test/test_sigmoid_cross_entropy_loss_layer.cpp +++ b/src/caffe/test/test_sigmoid_cross_entropy_loss_layer.cpp @@ -69,7 +69,6 @@ class SigmoidCrossEntropyLossLayerTest : public ::testing::Test { targets_filler_param.set_max(1.0); UniformFiller targets_filler(targets_filler_param); Dtype eps = 2e-2; - int num_inf = 0; for (int i = 0; i < 100; ++i) { // Fill the data vector data_filler.Fill(this->blob_bottom_data_); diff --git a/src/gtest/gtest-all.cpp b/src/gtest/gtest-all.cpp index 5ced66a..9261974 100644 --- a/src/gtest/gtest-all.cpp +++ b/src/gtest/gtest-all.cpp @@ -601,7 +601,6 @@ class GTestFlagSaver { bool list_tests_; String output_; bool print_time_; - bool pretty_; internal::Int32 random_seed_; internal::Int32 repeat_; bool shuffle_; -- 2.7.4