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

Function EqualAttrValueWrapper

tensorflow/python/client/tf_session_helper.cc:467–486  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

465}
466
467string EqualAttrValueWrapper(const string& actual, const string& expected) {
468 AttrValue actual_attr_value;
469 if (!actual_attr_value.ParseFromString(actual)) {
470 return "actual is not a valid serialized AttrValue";
471 }
472
473 AttrValue expected_attr_value;
474 if (!expected_attr_value.ParseFromString(expected)) {
475 return "expected is not a valid serialized AttrValue";
476 }
477
478 string diff;
479 if (!AreAttrValuesEqual(actual_attr_value, expected_attr_value)) {
480 diff = strings::Printf(
481 "Actual AttrValue %s does not match Expected AttrValue %s.",
482 SummarizeAttrValue(actual_attr_value).c_str(),
483 SummarizeAttrValue(expected_attr_value).c_str());
484 }
485 return diff;
486}
487
488// Return value set to 6 inlined elements so it fits in a 64-byte cache line.
489tensorflow::gtl::InlinedVector<int64_t, 6> TF_GraphGetTensorShapeHelper(

Callers

nothing calls this directly

Calls 5

AreAttrValuesEqualFunction · 0.85
PrintfFunction · 0.85
SummarizeAttrValueFunction · 0.85
c_strMethod · 0.80
ParseFromStringMethod · 0.45

Tested by

no test coverage detected