Home
last modified time | relevance | path

Searched refs:func_graph (Results 1 – 25 of 28) sorted by relevance

12

/external/tensorflow/tensorflow/python/ops/
Dcond_v2.py29 from tensorflow.python.framework import func_graph as func_graph_module
71 func_graph=util.CondBranchFuncGraph(
78 func_graph=util.CondBranchFuncGraph(
248 func_graph = function_def_to_graph.function_def_to_graph(
250 func_graph.captures = collections.OrderedDict(zip(inputs,
251 func_graph.inputs))
253 func_graph._if = if_op
254 return func_graph
260 def _grad_fn(func_graph, grads): argument
278 assert len(func_graph.outputs) == len(grads)
[all …]
Dcontrol_flow_util_v2.py26 from tensorflow.python.framework.func_graph import FuncGraph
65 def create_new_tf_function(func_graph): argument
75 func_graph.name, func_graph, func_graph.inputs, func_graph.outputs, {})
76 func.add_to_graph(func_graph.outer_graph)
77 return func_graph.name
Dwhile_v2_indexed_slices_rewriter.py23 from tensorflow.python.framework import func_graph
96 body_grad_graph.outputs = func_graph.flatten(
266 flat_idx = graph.outputs.index(func_graph.flatten(old_output_slices)[0])
269 graph.outputs = func_graph.flatten(
Dwhile_v2.py28 from tensorflow.python.framework import func_graph as func_graph_module
127 func_graph=util.WhileCondFuncGraph(
171 func_graph=util.WhileBodyFuncGraph(
312 func_graph=util.WhileCondFuncGraph(grad_cond_name))
418 func_graph = function_def_to_graph.function_def_to_graph(fdef, input_shapes)
419 func_graph._while = while_op
420 return func_graph
456 func_graph=_WhileBodyGradFuncGraph(name, cond_graph, body_graph,
475 def _grad_fn(ys, xs, args, func_graph): argument
502 ys, xs, grad_ys=grad_ys, src_graph=func_graph,
Dgradients_util.py36 from tensorflow.python.framework.func_graph import FuncGraph
454 def _Captures(func_graph): argument
455 if isinstance(func_graph, FuncGraph):
456 return func_graph.captures
458 assert isinstance(func_graph, framework_function._FuncGraph) # pylint: disable=protected-access
459 return func_graph._captured # pylint: disable=protected-access
/external/tensorflow/tensorflow/python/framework/
Dfunction_def_to_graph.py28 from tensorflow.python.framework.func_graph import FuncGraph
50 func_graph = FuncGraph(fdef.signature.name)
54 with func_graph.as_default():
64 func_graph.inputs = [
65 func_graph.get_tensor_by_name(name) for name in input_tensor_names
73 func_graph.outputs = [
74 func_graph.get_tensor_by_name(name) for name in output_tensor_names
76 func_graph.control_outputs = [
77 func_graph.get_operation_by_name(fdef.control_ret[ret_name])
81 return func_graph
Dfunc_graph.py520 func_graph=None,
585 if func_graph is None:
586 func_graph = FuncGraph(name, collections=collections,
588 assert isinstance(func_graph, FuncGraph)
593 with func_graph.as_default(), control_manager as a:
624 func_graph.structured_input_signature = (
632 func_graph.inputs = [arg for arg in flat_func_args + flat_func_kwargs
714 resource_placeholder = func_graph.captures.pop(arg.handle, None)
722 func_graph.inputs = inputs + list(func_graph.captures.values())
724 func_graph.structured_outputs = func_outputs
[all …]
Dfunction_def_to_graph_test.py217 func_graph = function_def_to_graph.function_def_to_graph(fdef)
218 with func_graph.as_default():
219 x_ph, y_ph = func_graph.inputs
220 with self.session(graph=func_graph) as sess:
222 sess.run(func_graph.outputs[0], feed_dict={
243 func_graph = function_def_to_graph.function_def_to_graph(fdef)
245 op = func_graph.get_operation_by_name("y")
Dfunction.py877 func_graph = _FuncGraph(name, capture_by_value, whitelisted_stateful_ops,
880 with func_graph.as_default(), ops.device(device):
883 func_graph._collections = collections_ref
885 func_graph._container = container
887 func_graph._colocation_stack = colocation_stack
896 func_graph.inputs.append(argholder)
898 with vs.variable_scope("", custom_getter=func_graph.getvar):
899 outputs = func(*func_graph.inputs)
919 outputs = [func_graph.capture(t) if t.graph is not func_graph else t
921 func_graph.outputs = outputs
[all …]
Dconvert_to_constants.py25 from tensorflow.python.framework import func_graph
91 output_graph = func_graph.FuncGraph(input_func.graph.name)
/external/tensorflow/tensorflow/python/eager/
Ddef_function.py28 from tensorflow.python.framework import func_graph as func_graph_module
159 func_graph = ops.get_default_graph()
161 func_graph.inputs + func_graph.internal_captures)
238 def __init__(self, func_graph): argument
239 self.func_graph = func_graph
243 func_graph_module.dismantle_func_graph(self.func_graph)
Dwrap_function.py27 from tensorflow.python.framework import func_graph
176 pruned_graph = func_graph.FuncGraph(name)
263 self.graph = func_graph.FuncGraph(name, collections=collections, **kwargs)
278 func_graph.func_graph_from_py_func(
283 func_graph=self.graph)
360 func_graph.func_graph_from_py_func(
Dlift_to_graph_test.py24 from tensorflow.python.framework import func_graph
44 g = func_graph.FuncGraph('lifted')
Dlift_to_graph.py25 from tensorflow.python.framework import func_graph
280 if (isinstance(base_graph, func_graph.FuncGraph) and
281 isinstance(graph, func_graph.FuncGraph)):
Dfunction.py43 from tensorflow.python.framework import func_graph as func_graph_module
450 def __init__(self, func_graph, attrs=None, signature=None): argument
467 self._func_graph = func_graph
2130 def __init__(self, func_graph): argument
2131 self._func_graph = func_graph
/external/tensorflow/tensorflow/python/saved_model/
Dfunction_deserialization.py27 from tensorflow.python.framework import func_graph as func_graph_lib
246 func_graph = function_def_lib.function_def_to_graph(copy)
248 functions[dep].add_to_graph(func_graph)
249 func = function_lib.ConcreteFunction(func_graph)
Dfunction_serialization.py22 from tensorflow.python.framework import func_graph as func_graph_module
/external/tensorflow/tensorflow/c/
Dc_api_function_test.cc1216 std::unique_ptr<TF_Graph, decltype(&TF_DeleteGraph)> func_graph( in DefineFunction() local
1221 TF_Operation* feed = Placeholder(func_graph.get(), s.get()); in DefineFunction()
1222 TF_Operation* neg = Neg(feed, func_graph.get(), s.get()); in DefineFunction()
1226 *func = TF_GraphToFunction(func_graph.get(), name, append_hash, -1, in DefineFunction()
1250 std::unique_ptr<TF_Graph, decltype(&TF_DeleteGraph)> func_graph( in TEST_F() local
1256 NodeWithPlaceholderAttrHelper(func_graph.get(), s.get(), "node1", "v1", in TEST_F()
1258 NodeWithPlaceholderAttrHelper(func_graph.get(), s.get(), "node2", "v1", in TEST_F()
1260 NodeWithPlaceholderAttrHelper(func_graph.get(), s.get(), "node3", "v2", in TEST_F()
1266 func_graph.get(), "func", /*append_hash_to_fn_name=*/false, -1, in TEST_F()
1556 std::unique_ptr<TF_Graph, decltype(&TF_DeleteGraph)> func_graph( in DefineStatefulFunction() local
[all …]
/external/tensorflow/tensorflow/compiler/tf2xla/
Dtf2xla_util.cc197 Graph* func_graph = fbody->graph; in PropagateConstIntoFuncAttr() local
199 ReplaceArgUsageWithConstNode(func_graph, const_input_index_to_node)); in PropagateConstIntoFuncAttr()
206 GraphToFunctionDef(*func_graph, new_func_name, &replace_fdef)); in PropagateConstIntoFuncAttr()
215 TF_RETURN_IF_ERROR(CopyAssociatedFunctions(func_graph, lookup_fld, fld)); in PropagateConstIntoFuncAttr()
/external/tensorflow/tensorflow/python/compiler/tensorrt/
DBUILD46 "//tensorflow/python:func_graph",
Dtrt_convert.py31 from tensorflow.python.framework import func_graph
296 converted_graph = func_graph.FuncGraph(func.graph.name)
/external/tensorflow/tensorflow/core/common_runtime/
Dfunction.cc385 FunctionBody* func_graph = nullptr; member
391 delete this->func_graph; in ~Item()
529 return iter->second->func_graph; in GetFunctionBody()
736 item->func_graph = fbody; in Instantiate()
864 fbody = (*item)->func_graph; in CreateItem()
/external/tensorflow/tensorflow/contrib/distribute/python/
Dmirrored_strategy_multigpu_test.py45 from tensorflow.python.framework import func_graph
277 with func_graph.FuncGraph("fg").as_default(), distribution.scope():
330 with func_graph.FuncGraph("fg").as_default(), distribution.scope():
/external/tensorflow/tensorflow/python/keras/engine/
Dbase_layer.py33 from tensorflow.python.framework import func_graph
466 graph = func_graph.FuncGraph('graph')
Dnetwork.py32 from tensorflow.python.framework import func_graph
799 graph = func_graph.FuncGraph('build_graph')

12