Sets any parameters not specified in a node to their defaults.
| 94 | |
| 95 | // Sets any parameters not specified in a node to their defaults. |
| 96 | Status 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 |
no test coverage detected