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

Method AttrValueAlreadyPresent

tensorflow/core/framework/node_def_builder.cc:264–275  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

262}
263
264bool NodeDefBuilder::AttrValueAlreadyPresent(StringPiece name,
265 const AttrValue& value) {
266 if (const AttrValue* found = AttrSlice(node_def_).Find(name)) {
267 if (!AreAttrValuesEqual(*found, value)) {
268 errors_.push_back(strings::StrCat("Inconsistent values for attr '", name,
269 "' ", SummarizeAttrValue(*found),
270 " vs. ", SummarizeAttrValue(value)));
271 }
272 return true;
273 }
274 return false;
275}
276
277NodeDefBuilder& NodeDefBuilder::Attr(StringPiece name, const AttrValue& value) {
278 if (!AttrValueAlreadyPresent(name, value)) {

Callers

nothing calls this directly

Calls 6

AttrSliceClass · 0.85
AreAttrValuesEqualFunction · 0.85
SummarizeAttrValueFunction · 0.85
StrCatFunction · 0.50
FindMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected