fixes _softmax function so that nn.softmax(...) and nn.log_softmax(...) can accept...
authorOlivia Nordquist <nolivia@google.com>
Fri, 12 Jan 2018 19:38:34 +0000 (11:38 -0800)
committerTensorFlower Gardener <gardener@tensorflow.org>
Fri, 12 Jan 2018 19:44:42 +0000 (11:44 -0800)
commitec804af7d84034868701b428a9f28bf6dd98deb1
treef149b8132d8c93ad020e148b59d90512bd639172
parent6518d0d67447587ecb1c72086995706662b65ab1
fixes _softmax function so that nn.softmax(...) and nn.log_softmax(...) can accept negative axes that aren't -1 as the documentation claims. _swap() was accepting negative indices when math_ops.range() does not accept negative indices

PiperOrigin-RevId: 181771157
tensorflow/python/ops/nn_ops.py
tensorflow/python/ops/nn_test.py