/external/tensorflow/tensorflow/contrib/py2tf/utils/ |
H A D | multiple_dispatch.py | 27 def run_cond(condition, true_fn, false_fn): 33 false_fn: A Python callable implementing the false branch of the 42 return control_flow_ops.cond(condition, true_fn, false_fn) 44 return py_cond(condition, true_fn, false_fn) 47 def py_cond(condition, true_fn, false_fn): 51 return false_fn()
|
H A D | multiple_dispatch_test.py | 30 false_fn = lambda: 3.0 31 self.assertEqual(multiple_dispatch.run_cond(True, true_fn, false_fn), 2.0) 32 self.assertEqual(multiple_dispatch.run_cond(False, true_fn, false_fn), 3.0) 37 false_fn = lambda: constant([3.0]) 39 out = multiple_dispatch.run_cond(constant(True), true_fn, false_fn) 41 out = multiple_dispatch.run_cond(constant(False), true_fn, false_fn)
|
/external/tensorflow/tensorflow/python/layers/ |
H A D | utils.py | 182 def smart_cond(pred, true_fn=None, false_fn=None, name=None): 183 """Return either `true_fn()` if predicate `pred` is true else `false_fn()`. 186 or `false_fn()`, otherwise we use `tf.cond` to dynamically route to both. 190 `false_fn`. 192 false_fn: The callable to be performed if pred is false. 196 Tensors returned by the call to either `true_fn` or `false_fn`. 199 TypeError: If `true_fn` or `false_fn` is not callable. 202 return control_flow_ops.cond(pred, true_fn=true_fn, false_fn=false_fn, 205 false_fn [all...] |
/external/tensorflow/tensorflow/python/eager/ |
H A D | function_test.py | 623 def false_fn(): function in function:AutomaticControlDependenciesTest.testCondMustRun 627 control_flow_ops.cond(p, true_fn, false_fn) 644 def false_fn(): function in function:AutomaticControlDependenciesTest.testCondMustRunSeparateRead 648 control_flow_ops.cond(p, true_fn, false_fn) 668 def false_fn(): function in function:AutomaticControlDependenciesTest.testCondNested 681 control_flow_ops.cond(p, true_fn, false_fn) 700 def false_fn(): function in function:AutomaticControlDependenciesTest.testCondOneBranch 704 control_flow_ops.cond(p, true_fn, false_fn) 721 def false_fn(): function in function:AutomaticControlDependenciesTest.testCondOneBranchUpdateBefore 725 control_flow_ops.cond(p, true_fn, false_fn) 741 def false_fn(): function in function:AutomaticControlDependenciesTest.testCondOneBranchUpdateAfter [all...] |
/external/tensorflow/tensorflow/contrib/kfac/python/ops/ |
H A D | utils.py | 405 def false_fn(_): function in function:batch_execute 415 false_fns = [false_fn(thunk) for thunk in thunks] 423 control_flow_ops.cond(condition, true_fn, false_fn) 425 false_fn) in zip(conditions, true_fns, false_fns)
|
/external/tensorflow/tensorflow/contrib/crf/python/ops/ |
H A D | crf.py | 109 false_fn=_multi_seq_fn) 152 false_fn=_multi_seq_fn) 517 false_fn=_multi_seq_fn)
|
/external/tensorflow/tensorflow/python/ops/ |
H A D | control_flow_ops_test.py | 380 control_flow_ops.smart_cond(True, false_fn=lambda: x) 445 false_fn=lambda: True) 455 control_flow_ops.cond(True, false_fn=lambda: x) 738 def false_fn(): function in function:DataTypesTest.test_sparse_tensors 746 self._testShape(true_fn, false_fn, shape) 747 self._testReturnValues(true_fn, false_fn, value1, value2) 748 self._testShape(true_fn, false_fn, [shape], strict=True) 749 self._testReturnValues(true_fn, false_fn, [value1], [value2], strict=True) 895 def false_fn(): function in function:DataTypesTest.test_nested 900 self._testShape(true_fn, false_fn, shap [all...] |
H A D | control_flow_ops.py | 1936 None, "fn1/fn2 are deprecated in favor of the true_fn/false_fn arguments.", 1940 false_fn=None, 1945 """Return `true_fn()` if the predicate `pred` is true else `false_fn()`. 1947 `true_fn` and `false_fn` both return lists of output tensors. `true_fn` and 1948 `false_fn` must have the same non-zero number and type of outputs. 1951 `true_fn` and `false_fn`. Consider the following simple program: 1965 Note that `cond` calls `true_fn` and `false_fn` *exactly once* (inside the 1968 `false_fn` calls with some additional graph nodes to ensure that the right 1972 `tensorflow.python.util.nest`. Both `true_fn` and `false_fn` must return the 1975 `true_fn` and/or `false_fn`, the [all...] |
/external/tensorflow/tensorflow/contrib/slim/python/slim/data/ |
H A D | tfexample_decoder.py | 277 false_fn=lambda: item)
|
/external/squashfs-tools/squashfs-tools/ |
H A D | action.c | 2497 static int false_fn(struct atom *atom, struct action_data *action_data) function 3237 { "false", 0, false_fn, NULL, 1, 0},
|
/external/tensorflow/tensorflow/contrib/metrics/python/ops/ |
H A D | metric_ops.py | 1125 false_fn=continue_computing_dynamic_auc)
|
/external/tensorflow/tensorflow/python/kernel_tests/ |
H A D | control_flow_ops_py_test.py | 562 false_fn = lambda: constant_op.constant([2.0]) 563 r = control_flow_ops.cond(constant_op.constant(False), true_fn, false_fn)
|