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

Method ToNodeDef

tensorflow/core/framework/function.cc:1650–1667  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1648}
1649
1650NodeDef FunctionDefHelper::Node::ToNodeDef() const {
1651 NodeDef n;
1652 n.set_op(this->op);
1653 n.set_name(this->ret[0]);
1654 for (const auto& a : this->attr) {
1655 n.mutable_attr()->insert({a.first, a.second.proto});
1656 }
1657 for (const string& a : this->arg) {
1658 n.add_input(a);
1659 }
1660 for (const string& d : this->dep) {
1661 n.add_input(strings::StrCat("^", d));
1662 }
1663 if (!this->device.empty()) {
1664 n.set_device(this->device);
1665 }
1666 return n;
1667}
1668
1669/* static */
1670FunctionDef FunctionDefHelper::Create(

Callers 1

CreateMethod · 0.80

Calls 7

set_opMethod · 0.80
StrCatFunction · 0.50
set_nameMethod · 0.45
insertMethod · 0.45
add_inputMethod · 0.45
emptyMethod · 0.45
set_deviceMethod · 0.45

Tested by

no test coverage detected