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

Function HasPlaceHolder

tensorflow/core/framework/attr_value_util.cc:593–618  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

591}
592
593bool HasPlaceHolder(const AttrValue& val) {
594 switch (val.value_case()) {
595 case AttrValue::kList: {
596 for (const NameAttrList& func : val.list().func()) {
597 for (const auto& p : func.attr()) {
598 if (HasPlaceHolder(p.second)) {
599 return true;
600 }
601 }
602 }
603 break;
604 }
605 case AttrValue::kFunc:
606 for (const auto& p : val.func().attr()) {
607 if (HasPlaceHolder(p.second)) {
608 return true;
609 }
610 }
611 break;
612 case AttrValue::kPlaceholder:
613 return true;
614 default:
615 break;
616 }
617 return false;
618}
619
620bool SubstitutePlaceholders(const SubstituteFunc& substitute,
621 AttrValue* value) {

Callers 1

TESTFunction · 0.85

Calls 3

listMethod · 0.80
attrMethod · 0.80
funcMethod · 0.45

Tested by 1

TESTFunction · 0.68