MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / TEST_F

Function TEST_F

tensorflow/core/grappler/utils/grappler_test_test.cc:29–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27class GrapplerTestTest : public GrapplerTest {};
28
29TEST_F(GrapplerTestTest, CompareIdenticalGraphs) {
30 tensorflow::Scope s1 = tensorflow::Scope::NewRootScope();
31 auto s1_a = ops::Variable(s1.WithOpName("a"), {2, 2}, DT_FLOAT);
32 auto s1_b = ops::Variable(s1.WithOpName("b"), {2, 2}, DT_FLOAT);
33 auto s1_add = ops::Add(s1.WithOpName("Add_1"), s1_a, s1_b);
34
35 tensorflow::Scope s2 = tensorflow::Scope::NewRootScope();
36 auto s2_a = ops::Variable(s2.WithOpName("a"), {2, 2}, DT_FLOAT);
37 auto s2_b = ops::Variable(s2.WithOpName("b"), {2, 2}, DT_FLOAT);
38 auto s2_add = ops::Add(s2.WithOpName("Add_1"), s2_a, s2_b);
39
40 GraphDef graph1;
41 TF_ASSERT_OK(s1.ToGraphDef(&graph1));
42
43 GraphDef graph2;
44 TF_ASSERT_OK(s2.ToGraphDef(&graph2));
45
46 CompareGraphs(graph1, graph2);
47}
48
49TEST_F(GrapplerTestTest, CheckNodesConnectivity) {
50 tensorflow::Scope s = tensorflow::Scope::NewRootScope();

Callers

nothing calls this directly

Calls 7

WithOpNameMethod · 0.80
VariableClass · 0.50
AddFunction · 0.50
MulFunction · 0.50
OutputClass · 0.50
AddNFunction · 0.50
ToGraphDefMethod · 0.45

Tested by

no test coverage detected