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

Function NDef

tensorflow/core/framework/function_testlib.cc:48–58  ·  view source on GitHub ↗

Helper to construct a NodeDef.

Source from the content-addressed store, hash-verified

46
47// Helper to construct a NodeDef.
48NodeDef NDef(StringPiece name, StringPiece op, gtl::ArraySlice<string> inputs,
49 gtl::ArraySlice<std::pair<string, FDH::AttrValueWrapper>> attrs,
50 const string& device) {
51 NodeDef n;
52 n.set_name(string(name));
53 n.set_op(string(op));
54 for (const auto& in : inputs) n.add_input(in);
55 n.set_device(device);
56 for (auto na : attrs) n.mutable_attr()->insert({na.first, na.second.proto});
57 return n;
58}
59
60FunctionDef NonZero() {
61 return FDH::Define(

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 5

set_opMethod · 0.80
set_nameMethod · 0.45
add_inputMethod · 0.45
set_deviceMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected