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

Function SetNodeTensorAttr

tensorflow/tools/graph_transforms/transform_utils.h:84–89  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82
83template <class T>
84inline void SetNodeTensorAttr(const string& key, const Tensor& tensor,
85 NodeDef* node) {
86 TensorProto tensor_proto;
87 tensor.AsProtoTensorContent(&tensor_proto);
88 SetNodeAttr(key, tensor_proto, node);
89}
90
91// Inserts a Tensor into the specified attribute of a NodeDef.
92template <class T>

Callers

nothing calls this directly

Calls 5

AsProtoTensorContentMethod · 0.80
SetNodeAttrFunction · 0.70
num_elementsMethod · 0.45
sizeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected