Commit 7f642e5a authored by Yong Tang's avatar Yong Tang
Browse files

Fix issue in tf.nn.softmax where negative dims could only be -1



This fix tries to address the issue raised in 14916 where
negative dims could only be -1 in tf.nn.softmax.
The issue was that dims=-1 was handled as a case of "last dim"
with `is_last_dim = (dim is -1) or (dim == shape.ndims - 1)`
but the generic negative dims were never processed.

This fix adds `dim += shape.ndims` for generic negative dims.

This fix fixes 14916.

Signed-off-by: default avatarYong Tang <yong.tang.github@outlook.com>
parent 5f1379e4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment