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

Function AddDefaultAttributes

serving/processor/framework/util/utils.cc:96–106  ·  view source on GitHub ↗

Sets any parameters not specified in a node to their defaults.

Source from the content-addressed store, hash-verified

94
95// Sets any parameters not specified in a node to their defaults.
96Status AddDefaultAttributes(const GraphDef& input_graph_def,
97 GraphDef* output_graph_def) {
98 // Find all of the ops that are currently defined.
99 std::unique_ptr<FunctionLibraryDefinition> flib_def(
100 new FunctionLibraryDefinition(OpRegistry::Global(),
101 input_graph_def.library()));
102 // Works in-place, so copy over the original graph.
103 *output_graph_def = input_graph_def;
104 TF_RETURN_IF_ERROR(AddDefaultAttrsToGraphDef(output_graph_def, *flib_def, 0));
105 return Status::OK();
106}
107
108} // namespace processor
109} // namespace tensorflow

Callers 1

GraphOptimizerMethod · 0.50

Calls 2

libraryMethod · 0.45

Tested by

no test coverage detected