Question about intended behavior of is_continuous_axis for decreasing axes #22144
Unanswered
MalyalaKarthik66
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi Keras team,
While contributing and reading through keras/src/utils/python_utils.py, I noticed the implementation of
is_continuous_axis.Currently, the function defines a
negative_order_flag, but the loop checks the same condition as the positive case (axis[i + 1] - axis[i] != 1). From local testing, decreasing contiguous sequences (e.g.,[3, 2, 1, 0]) currently returnFalse.I wanted to check the intended behavior here:
• Was this function meant to treat decreasing contiguous axes as continuous (as the
negative_order_flagname might suggest)?• If the condition were changed to check
!= -1, could that introduce issues for backend kernel selection paths (for example innn.pyfor normalization layers)?I have a small patch and unit tests prepared, but wanted to confirm the intended semantics before opening a PR.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions