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

Function StrippedOpListForGraph

tensorflow/core/framework/graph_def_util.cc:211–227  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

209}
210
211Status StrippedOpListForGraph(const GraphDef& graph_def,
212 const OpRegistryInterface& op_registry,
213 OpList* stripped_op_list) {
214 std::set<string> used_ops;
215 OpsUsedByGraph(graph_def, &used_ops);
216
217 // Build the stripped op list in sorted order, ignoring functions.
218 stripped_op_list->clear_op();
219 for (const string& op_name : used_ops) {
220 const OpDef* op_def;
221 TF_RETURN_IF_ERROR(op_registry.LookUpOpDef(op_name, &op_def));
222 OpDef* stripped_op = stripped_op_list->add_op();
223 stripped_op->CopyFrom(*op_def);
224 RemoveDescriptionsFromOpDef(stripped_op);
225 }
226 return Status::OK();
227}
228
229} // namespace tensorflow

Callers 1

TESTFunction · 0.85

Calls 5

OpsUsedByGraphFunction · 0.85
LookUpOpDefMethod · 0.80
add_opMethod · 0.45
CopyFromMethod · 0.45

Tested by 1

TESTFunction · 0.68