From 5d04d57a194f000a27e946656f98138f0808c1b2 Mon Sep 17 00:00:00 2001 From: Jeff Donahue Date: Sat, 15 Feb 2014 16:38:47 -0800 Subject: [PATCH] change \" in test_split_layer to ' for readability --- src/caffe/test/test_split_layer.cpp | 260 ++++++++++++++++++------------------ 1 file changed, 129 insertions(+), 131 deletions(-) diff --git a/src/caffe/test/test_split_layer.cpp b/src/caffe/test/test_split_layer.cpp index f6d5d52..1d7c3d5 100644 --- a/src/caffe/test/test_split_layer.cpp +++ b/src/caffe/test/test_split_layer.cpp @@ -171,8 +171,6 @@ class SplitLayerInsertionTest : public ::testing::Test { output_param_string, &expected_output_param)); NetParameter actual_output_param; insert_splits(input_param, &actual_output_param); - CHECK_EQ(expected_output_param.DebugString(), - actual_output_param.DebugString()); EXPECT_EQ(expected_output_param.DebugString(), actual_output_param.DebugString()); } @@ -183,275 +181,275 @@ TYPED_TEST_CASE(SplitLayerInsertionTest, InsertionDtypes); TYPED_TEST(SplitLayerInsertionTest, TestNoInsertion1) { const string& input_proto = - "name: \"TestNetwork\" " + "name: 'TestNetwork' " "layers: { " " layer { " - " name: \"data\" " - " type: \"data\" " + " name: 'data' " + " type: 'data' " " } " - " top: \"data\" " - " top: \"label\" " + " top: 'data' " + " top: 'label' " "} " "layers: { " " layer { " - " name: \"innerprod\" " - " type: \"inner_product\" " + " name: 'innerprod' " + " type: 'inner_product' " " } " - " bottom: \"data\" " - " top: \"innerprod\" " + " bottom: 'data' " + " top: 'innerprod' " "} " "layers: { " " layer { " - " name: \"loss\" " - " type: \"softmax_with_loss\" " + " name: 'loss' " + " type: 'softmax_with_loss' " " } " - " bottom: \"innerprod\" " - " bottom: \"label\" " + " bottom: 'innerprod' " + " bottom: 'label' " "} "; this->RunInsertionTest(input_proto, input_proto); } TYPED_TEST(SplitLayerInsertionTest, TestNoInsertion2) { const string& input_proto = - "name: \"TestNetwork\" " + "name: 'TestNetwork' " "layers: { " " layer { " - " name: \"data\" " - " type: \"data\" " + " name: 'data' " + " type: 'data' " " } " - " top: \"data\" " - " top: \"label\" " + " top: 'data' " + " top: 'label' " "} " "layers: { " " layer { " - " name: \"data_split\" " - " type: \"split\" " + " name: 'data_split' " + " type: 'split' " " } " - " bottom: \"data\" " - " top: \"data_split_0\" " - " top: \"data_split_1\" " + " bottom: 'data' " + " top: 'data_split_0' " + " top: 'data_split_1' " "} " "layers: { " " layer { " - " name: \"innerprod1\" " - " type: \"inner_product\" " + " name: 'innerprod1' " + " type: 'inner_product' " " } " - " bottom: \"data_split_0\" " - " top: \"innerprod1\" " + " bottom: 'data_split_0' " + " top: 'innerprod1' " "} " "layers: { " " layer { " - " name: \"innerprod2\" " - " type: \"inner_product\" " + " name: 'innerprod2' " + " type: 'inner_product' " " } " - " bottom: \"data_split_1\" " - " top: \"innerprod2\" " + " bottom: 'data_split_1' " + " top: 'innerprod2' " "} " "layers: { " " layer { " - " name: \"loss\" " - " type: \"euclidean_loss\" " + " name: 'loss' " + " type: 'euclidean_loss' " " } " - " bottom: \"innerprod1\" " - " bottom: \"innerprod2\" " + " bottom: 'innerprod1' " + " bottom: 'innerprod2' " "} "; this->RunInsertionTest(input_proto, input_proto); } TYPED_TEST(SplitLayerInsertionTest, TestInsertion) { const string& input_proto = - "name: \"TestNetwork\" " + "name: 'TestNetwork' " "layers: { " " layer { " - " name: \"data\" " - " type: \"data\" " + " name: 'data' " + " type: 'data' " " } " - " top: \"data\" " - " top: \"label\" " + " top: 'data' " + " top: 'label' " "} " "layers: { " " layer { " - " name: \"innerprod1\" " - " type: \"inner_product\" " + " name: 'innerprod1' " + " type: 'inner_product' " " } " - " bottom: \"data\" " - " top: \"innerprod1\" " + " bottom: 'data' " + " top: 'innerprod1' " "} " "layers: { " " layer { " - " name: \"innerprod2\" " - " type: \"inner_product\" " + " name: 'innerprod2' " + " type: 'inner_product' " " } " - " bottom: \"data\" " - " top: \"innerprod2\" " + " bottom: 'data' " + " top: 'innerprod2' " "} " "layers: { " " layer { " - " name: \"innerprod3\" " - " type: \"inner_product\" " + " name: 'innerprod3' " + " type: 'inner_product' " " } " - " bottom: \"data\" " - " top: \"innerprod3\" " + " bottom: 'data' " + " top: 'innerprod3' " "} " "layers: { " " layer { " - " name: \"loss\" " - " type: \"euclidean_loss\" " + " name: 'loss' " + " type: 'euclidean_loss' " " } " - " bottom: \"innerprod1\" " - " bottom: \"innerprod2\" " + " bottom: 'innerprod1' " + " bottom: 'innerprod2' " "} " "layers: { " " layer { " - " name: \"loss\" " - " type: \"euclidean_loss\" " + " name: 'loss' " + " type: 'euclidean_loss' " " } " - " bottom: \"innerprod2\" " - " bottom: \"innerprod3\" " + " bottom: 'innerprod2' " + " bottom: 'innerprod3' " "} "; const string& expected_output_proto = - "name: \"TestNetwork\" " + "name: 'TestNetwork' " "layers: { " " layer { " - " name: \"data\" " - " type: \"data\" " + " name: 'data' " + " type: 'data' " " } " - " top: \"data\" " - " top: \"label\" " + " top: 'data' " + " top: 'label' " "} " "layers: { " " layer { " - " name: \"data_split\" " - " type: \"split\" " + " name: 'data_split' " + " type: 'split' " " } " - " bottom: \"data\" " - " top: \"data\" " - " top: \"data_split_1\" " - " top: \"data_split_2\" " + " bottom: 'data' " + " top: 'data' " + " top: 'data_split_1' " + " top: 'data_split_2' " "} " "layers: { " " layer { " - " name: \"innerprod1\" " - " type: \"inner_product\" " + " name: 'innerprod1' " + " type: 'inner_product' " " } " - " bottom: \"data\" " - " top: \"innerprod1\" " + " bottom: 'data' " + " top: 'innerprod1' " "} " "layers: { " " layer { " - " name: \"innerprod2\" " - " type: \"inner_product\" " + " name: 'innerprod2' " + " type: 'inner_product' " " } " - " bottom: \"data_split_1\" " - " top: \"innerprod2\" " + " bottom: 'data_split_1' " + " top: 'innerprod2' " "} " "layers: { " " layer { " - " name: \"innerprod2_split\" " - " type: \"split\" " + " name: 'innerprod2_split' " + " type: 'split' " " } " - " bottom: \"innerprod2\" " - " top: \"innerprod2\" " - " top: \"innerprod2_split_1\" " + " bottom: 'innerprod2' " + " top: 'innerprod2' " + " top: 'innerprod2_split_1' " "} " "layers: { " " layer { " - " name: \"innerprod3\" " - " type: \"inner_product\" " + " name: 'innerprod3' " + " type: 'inner_product' " " } " - " bottom: \"data_split_2\" " - " top: \"innerprod3\" " + " bottom: 'data_split_2' " + " top: 'innerprod3' " "} " "layers: { " " layer { " - " name: \"loss\" " - " type: \"euclidean_loss\" " + " name: 'loss' " + " type: 'euclidean_loss' " " } " - " bottom: \"innerprod1\" " - " bottom: \"innerprod2\" " + " bottom: 'innerprod1' " + " bottom: 'innerprod2' " "} " "layers: { " " layer { " - " name: \"loss\" " - " type: \"euclidean_loss\" " + " name: 'loss' " + " type: 'euclidean_loss' " " } " - " bottom: \"innerprod2_split_1\" " - " bottom: \"innerprod3\" " + " bottom: 'innerprod2_split_1' " + " bottom: 'innerprod3' " "} "; this->RunInsertionTest(input_proto, expected_output_proto); } TYPED_TEST(SplitLayerInsertionTest, TestInputInsertion) { const string& input_proto = - "name: \"TestNetwork\" " - "input: \"data\" " + "name: 'TestNetwork' " + "input: 'data' " "input_dim: 10 " "input_dim: 3 " "input_dim: 227 " "input_dim: 227 " "layers: { " " layer { " - " name: \"innerprod1\" " - " type: \"inner_product\" " + " name: 'innerprod1' " + " type: 'inner_product' " " } " - " bottom: \"data\" " - " top: \"innerprod1\" " + " bottom: 'data' " + " top: 'innerprod1' " "} " "layers: { " " layer { " - " name: \"innerprod2\" " - " type: \"inner_product\" " + " name: 'innerprod2' " + " type: 'inner_product' " " } " - " bottom: \"data\" " - " top: \"innerprod2\" " + " bottom: 'data' " + " top: 'innerprod2' " "} " "layers: { " " layer { " - " name: \"loss\" " - " type: \"euclidean_loss\" " + " name: 'loss' " + " type: 'euclidean_loss' " " } " - " bottom: \"innerprod1\" " - " bottom: \"innerprod2\" " + " bottom: 'innerprod1' " + " bottom: 'innerprod2' " "} "; const string& expected_output_proto = - "name: \"TestNetwork\" " - "input: \"data\" " + "name: 'TestNetwork' " + "input: 'data' " "input_dim: 10 " "input_dim: 3 " "input_dim: 227 " "input_dim: 227 " "layers: { " " layer { " - " name: \"data_split\" " - " type: \"split\" " + " name: 'data_split' " + " type: 'split' " " } " - " bottom: \"data\" " - " top: \"data\" " - " top: \"data_split_1\" " + " bottom: 'data' " + " top: 'data' " + " top: 'data_split_1' " "} " "layers: { " " layer { " - " name: \"innerprod1\" " - " type: \"inner_product\" " + " name: 'innerprod1' " + " type: 'inner_product' " " } " - " bottom: \"data\" " - " top: \"innerprod1\" " + " bottom: 'data' " + " top: 'innerprod1' " "} " "layers: { " " layer { " - " name: \"innerprod2\" " - " type: \"inner_product\" " + " name: 'innerprod2' " + " type: 'inner_product' " " } " - " bottom: \"data_split_1\" " - " top: \"innerprod2\" " + " bottom: 'data_split_1' " + " top: 'innerprod2' " "} " "layers: { " " layer { " - " name: \"loss\" " - " type: \"euclidean_loss\" " + " name: 'loss' " + " type: 'euclidean_loss' " " } " - " bottom: \"innerprod1\" " - " bottom: \"innerprod2\" " + " bottom: 'innerprod1' " + " bottom: 'innerprod2' " "} "; this->RunInsertionTest(input_proto, expected_output_proto); } -- 2.7.4