diff options
author | Skye Wanderman-Milne <skyewm@google.com> | 2018-06-05 13:16:57 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-06-05 13:19:55 -0700 |
commit | 1bac6186e19353d9881584ce8ec51bf35d627842 (patch) | |
tree | a784202375b10299c8e86f6e5f3d811e392c71a1 /tensorflow/contrib/__init__.py | |
parent | c681be04ec15cdfc225bc61132420781bf23d298 (diff) |
Introduce tf.contrib.control_flow.new_cond.
new_cond is a new implementation of tf.cond. Instead of emitting
control flow ops (i.e. Switch and Merge nodes), new_cond emits a
single If op, which represents the conditional branches as TF
functions.
With this change, users can use new_cond and take its gradient.
The idea is for new_cond to eventually replace tf.cond. There are
several functional and performance gaps that must be addressed first,
including:
* Gradients won't work on imported graphs
* Misc. limitations of TF functions (lack of collections, device scopes, etc.)
PiperOrigin-RevId: 199346735
Diffstat (limited to 'tensorflow/contrib/__init__.py')
-rw-r--r-- | tensorflow/contrib/__init__.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tensorflow/contrib/__init__.py b/tensorflow/contrib/__init__.py index 9aad772f0a..ad8c40395c 100644 --- a/tensorflow/contrib/__init__.py +++ b/tensorflow/contrib/__init__.py @@ -30,6 +30,7 @@ from tensorflow.contrib import cluster_resolver from tensorflow.contrib import coder from tensorflow.contrib import compiler from tensorflow.contrib import constrained_optimization +from tensorflow.contrib import control_flow from tensorflow.contrib import copy_graph from tensorflow.contrib import crf from tensorflow.contrib import cudnn_rnn |