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

Method __init__

tensorflow/python/eager/wrap_function.py:221–229  ·  view source on GitHub ↗
(self, fn_graph, variable_holder, attrs=None, signature=None)

Source from the content-addressed store, hash-verified

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.

Callers

nothing calls this directly

Calls 5

_lift_unlifted_variablesFunction · 0.85
as_graph_defMethod · 0.80
add_function_defMethod · 0.80
contextMethod · 0.45
__init__Method · 0.45

Tested by

no test coverage detected