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

Function GDef

tensorflow/core/framework/function_testlib.cc:31–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29typedef FunctionDefHelper FDH;
30
31GraphDef GDef(gtl::ArraySlice<NodeDef> nodes,
32 gtl::ArraySlice<FunctionDef> funcs) {
33 GraphDef g;
34 VersionDef* versions = g.mutable_versions();
35 versions->set_producer(TF_GRAPH_DEF_VERSION);
36 versions->set_min_consumer(TF_GRAPH_DEF_VERSION_MIN_CONSUMER);
37 for (const auto& n : nodes) {
38 *(g.add_node()) = n;
39 }
40 auto lib = g.mutable_library();
41 for (const auto& f : funcs) {
42 *(lib->add_function()) = f;
43 }
44 return g;
45}
46
47// Helper to construct a NodeDef.
48NodeDef NDef(StringPiece name, StringPiece op, gtl::ArraySlice<string> inputs,

Callers 15

PackGradFunction · 0.85
UnpackGradFunction · 0.85
ConcatGradFunction · 0.85
ConcatGradV2Function · 0.85
SplitGradFunction · 0.85
SplitVGradFunction · 0.85
ReshapeGradFunction · 0.85
ExpandDimsGradFunction · 0.85
SqueezeGradFunction · 0.85
TransposeGradFunction · 0.85
ReverseGradFunction · 0.85
ReverseV2GradFunction · 0.85

Calls 1

add_functionMethod · 0.45

Tested by

no test coverage detected