MCPcopy Create free account
hub / github.com/BVLC/caffe / RunInsertionTest

Method RunInsertionTest

src/caffe/test/test_split_layer.cpp:90–110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

88class SplitLayerInsertionTest : public ::testing::Test {
89 protected:
90 void RunInsertionTest(
91 const string& input_param_string, const string& output_param_string) {
92 // Test that InsertSplits called on the proto specified by
93 // input_param_string results in the proto specified by
94 // output_param_string.
95 NetParameter input_param;
96 CHECK(google::protobuf::TextFormat::ParseFromString(
97 input_param_string, &input_param));
98 NetParameter expected_output_param;
99 CHECK(google::protobuf::TextFormat::ParseFromString(
100 output_param_string, &expected_output_param));
101 NetParameter actual_output_param;
102 InsertSplits(input_param, &actual_output_param);
103 EXPECT_EQ(expected_output_param.DebugString(),
104 actual_output_param.DebugString());
105 // Also test idempotence.
106 NetParameter double_split_insert_param;
107 InsertSplits(actual_output_param, &double_split_insert_param);
108 EXPECT_EQ(actual_output_param.DebugString(),
109 double_split_insert_param.DebugString());
110 }
111};
112
113TEST_F(SplitLayerInsertionTest, TestNoInsertion1) {

Callers 1

TEST_FFunction · 0.80

Calls 1

InsertSplitsFunction · 0.85

Tested by

no test coverage detected