Skip to content

Fix negative axis issue with ragged tensor and reduce_sum#27699

Merged
tensorflow-copybara merged 2 commits intotensorflow:masterfrom
yongtang:27497-ragged-axis
Apr 18, 2019
Merged

Fix negative axis issue with ragged tensor and reduce_sum#27699
tensorflow-copybara merged 2 commits intotensorflow:masterfrom
yongtang:27497-ragged-axis

Conversation

@yongtang
Copy link
Member

This fix tries to address the issue raised in #27497 where tf.reduce_sum with multiple negative axes and ragged tensor does not produce correct result.

The issue is that during reduce op, ragged tensor will reduce one axis at a time. However, for negative axis, sort result is reversed so order is different.

This fix convert to positive before the sort to make sure the order.

This fix fixes #27497.

Signed-off-by: Yong Tang yong.tang.github@outlook.com

This fix tries to address the issue raised in 27497 where
`tf.reduce_sum` with multiple negative axes and ragged tensor
does not produce correct result.

The issue is that during reduce op, ragged tensor will reduce
one axis at a time. However, for negative axis, sort result is
reversed so order is different.

This fix convert to positive before the sort to make sure
the order.

This fix fixes 27497.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
@gbaned gbaned added comp:ops OPs related issues size:S CL Change Size: Small labels Apr 10, 2019
@gbaned gbaned requested a review from aselle April 10, 2019 05:06
@yongtang yongtang requested a review from edloper April 10, 2019 12:35
@rthadur rthadur added kokoro:force-run Tests on submitted change ready to pull PR ready for merge process labels Apr 10, 2019
@kokoro-team kokoro-team removed the kokoro:force-run Tests on submitted change label Apr 10, 2019
@alextp alextp added the kokoro:force-run Tests on submitted change label Apr 17, 2019
@kokoro-team kokoro-team removed the kokoro:force-run Tests on submitted change label Apr 17, 2019
@rthadur
Copy link
Contributor

rthadur commented Apr 18, 2019

@yongtang can you please check build failures

@tensorflow-copybara tensorflow-copybara merged commit f303882 into tensorflow:master Apr 18, 2019
tensorflow-copybara pushed a commit that referenced this pull request Apr 18, 2019
@yongtang yongtang deleted the 27497-ragged-axis branch April 18, 2019 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes comp:ops OPs related issues ready to pull PR ready for merge process size:S CL Change Size: Small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

tf.reduce_sum with multiple negative axes and tf.RaggedTensor bugged

8 participants