Improvements to function._FuncGraph.
* Adds 'inputs', 'outputs', and 'name' field to _FuncGraph. This allows _FuncGraph to encapsulate all the information needed to convert it to a FunctionDef. * Refactor logic for converting a Python callable to a _FuncGraph into a new method, func_graph_from_py_func(). These changes are in preparation for converting tf.cond to emit an If op. By exposing _FuncGraph functionality outside of _DefinedFunction, _FuncGraphs can be used to represent functions that are manipulated (e.g. to output intermediate tensors) before being converted to FunctionDef protos. PiperOrigin-RevId: 197003496
Loading
Please sign in to comment