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

Function HasParametrizedBody

tensorflow/core/grappler/utils/functions.cc:134–143  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

132}
133
134bool HasParametrizedBody(const FunctionDef& func) {
135 const auto is_parametrized = [&](const NodeDef& node) {
136 for (const auto& attr : node.attr()) {
137 if (!attr.second.placeholder().empty()) return true;
138 }
139 return false;
140 };
141 return std::any_of(func.node_def().begin(), func.node_def().end(),
142 is_parametrized);
143}
144
145bool IsParametrized(const FunctionDef& func) {
146 return HasParametrizedType(func) || HasParametrizedBody(func);

Callers 2

IsParametrizedFunction · 0.85
TEST_FFunction · 0.85

Calls 6

attrMethod · 0.80
emptyMethod · 0.45
placeholderMethod · 0.45
beginMethod · 0.45
node_defMethod · 0.45
endMethod · 0.45

Tested by 1

TEST_FFunction · 0.68