diff options
author | Martin Wicke <wicke@google.com> | 2017-01-05 00:53:21 -0800 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2017-01-05 01:29:41 -0800 |
commit | 7c975274336e18fa9a154417011a37a117b74c79 (patch) | |
tree | bf0106667863a341d82c783b5e1559667fe6b48b /tensorflow/contrib/labeled_tensor | |
parent | b9b7b8892e6aac8eccb1e41c4f232c6a9732e9aa (diff) |
Make labeled_tensor use tf.contrib.nn.deprecated_flipped_* versions of xent losses.
Change: 143639671
Diffstat (limited to 'tensorflow/contrib/labeled_tensor')
-rw-r--r-- | tensorflow/contrib/labeled_tensor/BUILD | 1 | ||||
-rw-r--r-- | tensorflow/contrib/labeled_tensor/python/ops/nn.py | 8 |
2 files changed, 5 insertions, 4 deletions
diff --git a/tensorflow/contrib/labeled_tensor/BUILD b/tensorflow/contrib/labeled_tensor/BUILD index f8efe0fb8d..411819bf9e 100644 --- a/tensorflow/contrib/labeled_tensor/BUILD +++ b/tensorflow/contrib/labeled_tensor/BUILD @@ -110,6 +110,7 @@ py_library( srcs_version = "PY2AND3", deps = [ ":core", + "//tensorflow/contrib/nn:nn_py", "//tensorflow/python:nn", ], ) diff --git a/tensorflow/contrib/labeled_tensor/python/ops/nn.py b/tensorflow/contrib/labeled_tensor/python/ops/nn.py index dce16ccf27..90c2ee0b90 100644 --- a/tensorflow/contrib/labeled_tensor/python/ops/nn.py +++ b/tensorflow/contrib/labeled_tensor/python/ops/nn.py @@ -18,10 +18,10 @@ from __future__ import absolute_import from __future__ import division from __future__ import print_function +from tensorflow.contrib import nn as contrib_nn from tensorflow.contrib.labeled_tensor.python.ops import core from tensorflow.python.ops import nn - relu = core.define_unary_op('relu', nn.relu) relu6 = core.define_unary_op('relu6', nn.relu6) crelu = core.define_unary_op('crelu', nn.crelu) @@ -31,12 +31,12 @@ softplus = core.define_unary_op('softplus', nn.softplus) l2_loss = core.define_unary_op('l2_loss', nn.l2_loss) sigmoid_cross_entropy_with_logits = core.define_binary_op( 'sigmoid_cross_entropy_with_logits', - nn.sigmoid_cross_entropy_with_logits) + contrib_nn.deprecated_flipped_sigmoid_cross_entropy_with_logits) softmax = core.define_unary_op('softmax', nn.softmax) log_softmax = core.define_unary_op('log_softmax', nn.log_softmax) softmax_cross_entropy_with_logits = core.define_binary_op( 'softmax_cross_entropy_with_logits', - nn.softmax_cross_entropy_with_logits) + contrib_nn.deprecated_flipped_softmax_cross_entropy_with_logits) sparse_softmax_cross_entropy_with_logits = core.define_binary_op( 'sparse_softmax_cross_entropy_with_logits', - nn.sparse_softmax_cross_entropy_with_logits) + contrib_nn.deprecated_flipped_sparse_softmax_cross_entropy_with_logits) |