(self, fn_graph, variable_holder, attrs=None, signature=None)
| 219 | """Wraps a tf V1 piece of code in a function.""" |
| 220 | |
| 221 | def __init__(self, fn_graph, variable_holder, attrs=None, signature=None): |
| 222 | self._variable_holder = variable_holder |
| 223 | _lift_unlifted_variables(fn_graph, variable_holder) |
| 224 | # We call __init__ after lifting variables so that the function's signature |
| 225 | # properly reflects the new captured inputs. |
| 226 | for f in fn_graph.as_graph_def().library.function: |
| 227 | context.context().add_function_def(f) |
| 228 | super(WrappedFunction, self).__init__( |
| 229 | fn_graph, attrs=attrs, signature=signature) |
| 230 | |
| 231 | def prune(self, feeds, fetches, name=None, input_signature=None): |
| 232 | """Extract a subgraph of this function's underlying graph. |
nothing calls this directly
no test coverage detected