diff options
author | 2017-01-04 21:25:34 -0800 | |
---|---|---|
committer | 2017-01-04 21:46:08 -0800 | |
commit | 333dc32ff79af21484695157f3d141dc776f7c02 (patch) | |
tree | b379bcaa56bfa54d12ea839fb7e62ab163490743 /tensorflow/contrib/nn | |
parent | d9541696b068cfcc1fab66b03d0b8d605b64f14d (diff) |
Change arg order for {softmax,sparse_softmax,sigmoid}_cross_entropy_with_logits to be (labels, predictions), and force use of named args to avoid accidents.
Change: 143629623
Diffstat (limited to 'tensorflow/contrib/nn')
-rw-r--r-- | tensorflow/contrib/nn/python/ops/cross_entropy.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tensorflow/contrib/nn/python/ops/cross_entropy.py b/tensorflow/contrib/nn/python/ops/cross_entropy.py index 7e698f86de..61c1d1c6d9 100644 --- a/tensorflow/contrib/nn/python/ops/cross_entropy.py +++ b/tensorflow/contrib/nn/python/ops/cross_entropy.py @@ -65,7 +65,7 @@ def deprecated_flipped_softmax_cross_entropy_with_logits(logits, softmax cross entropy loss. """ return nn.softmax_cross_entropy_with_logits( - logits=logits, labels=labels, dim=dim, name=name) + labels=labels, logits=logits, dim=dim, name=name) # TODO(b/33392402): Formally deprecate this API. @@ -119,7 +119,7 @@ def deprecated_flipped_sparse_softmax_cross_entropy_with_logits(logits, of the labels is not equal to the rank of the labels minus one. """ return nn.sparse_softmax_cross_entropy_with_logits( - logits=logits, labels=labels, name=name) + labels=labels, logits=logits, name=name) # TODO(b/33392402): Formally deprecate this API. @@ -174,4 +174,4 @@ def deprecated_flipped_sigmoid_cross_entropy_with_logits(logits, ValueError: If `logits` and `targets` do not have the same shape. """ return nn.sigmoid_cross_entropy_with_logits( - logits=logits, targets=targets, name=name) + labels=targets, logits=logits, name=name) |