Converts func_graph to a TF_Function and adds it to the current graph. Args: func_graph: FuncGraph Returns: The name of the new TF_Function.
(func_graph)
| 49 | |
| 50 | |
| 51 | def create_new_tf_function(func_graph): |
| 52 | """Converts func_graph to a TF_Function and adds it to the current graph. |
| 53 | |
| 54 | Args: |
| 55 | func_graph: FuncGraph |
| 56 | |
| 57 | Returns: |
| 58 | The name of the new TF_Function. |
| 59 | """ |
| 60 | func = function._EagerDefinedFunction( # pylint: disable=protected-access |
| 61 | func_graph.name, func_graph, func_graph.inputs, func_graph.outputs, {}) |
| 62 | func.add_to_graph(func_graph.outer_graph) |
| 63 | return func_graph.name |
| 64 | |
| 65 | |
| 66 | def unique_fn_name(scope, name): |
nothing calls this directly
no test coverage detected