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

Function TEST

tensorflow/core/graph/validate_test.cc:38–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36REGISTER_OP("Int32Input").Output("o: int32");
37
38TEST(ValidateGraphDefTest, TestValidGraph) {
39 const string graph_def_str =
40 "node { name: 'A' op: 'FloatInput' }"
41 "node { name: 'B' op: 'FloatInput' }"
42 "node { name: 'C' op: 'Mul' attr { key: 'T' value { type: DT_FLOAT } }"
43 " input: ['A', 'B'] }";
44 GraphDef graph_def;
45 auto parser = protobuf::TextFormat::Parser();
46 CHECK(parser.MergeFromString(graph_def_str, &graph_def)) << graph_def_str;
47 TF_ASSERT_OK(graph::ValidateGraphDef(graph_def, *OpRegistry::Global()));
48}
49
50TEST(ValidateGraphDefTest, GraphWithUnspecifiedDefaultAttr) {
51 const string graph_def_str =

Callers

nothing calls this directly

Calls 15

ValidateGraphDefFunction · 0.85
OpDefBuilderClass · 0.85
GetOpListForValidationFunction · 0.85
nameMethod · 0.65
StrContainsFunction · 0.50
okMethod · 0.45
ToStringMethod · 0.45
FinalizeMethod · 0.45
add_opMethod · 0.45

Tested by

no test coverage detected