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

Function SetNodeAttr

tensorflow/core/grappler/clusters/single_machine_test.cc:386–391  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

384
385template <class T>
386inline void SetNodeAttr(const string& key, const T& value, NodeDef* node) {
387 AttrValue attr_value;
388 SetAttrValue(value, &attr_value);
389 auto* attr_map = node->mutable_attr();
390 (*attr_map)[key] = attr_value;
391}
392template <>
393inline void SetNodeAttr(const string& key, const Tensor& tensor,
394 NodeDef* node) {

Callers 1

TEST_FFunction · 0.70

Calls 2

AsProtoTensorContentMethod · 0.80
SetAttrValueFunction · 0.50

Tested by

no test coverage detected