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

Function tensor_const_node

tensorflow/core/graph/graph_constructor.cc:1577–1587  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1575}
1576
1577Node* tensor_const_node(Graph* g, Tensor& t, const string& name,
1578 const string& device_name) {
1579 Node* ret;
1580 TF_CHECK_OK(NodeBuilder(g->NewName(name), "Const")
1581 .Device(device_name)
1582 .Attr("dtype", DT_INT32)
1583 .Attr("value", t)
1584 .Finalize(g, &ret));
1585 ret->set_assigned_device_name(device_name);
1586 return ret;
1587}
1588
1589typedef std::vector<Node*> node_list;
1590node_list DuplicateNode(Node* n, Graph* dest, int32 duplicate_num) {

Callers 1

AggregateForSparseApplyFunction · 0.85

Calls 6

NodeBuilderClass · 0.70
FinalizeMethod · 0.45
AttrMethod · 0.45
DeviceMethod · 0.45
NewNameMethod · 0.45

Tested by

no test coverage detected