-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add chainerx.cumsum
#7558
Add chainerx.cumsum
#7558
Conversation
I got rid of the |
Fixed the implementation (Seems to work correctly when I tested locally). Only tests are remaining. |
tests/chainerx_tests/unit_tests/routines_tests/test_reduction.py
Outdated
Show resolved
Hide resolved
tests/chainerx_tests/unit_tests/routines_tests/test_reduction.py
Outdated
Show resolved
Hide resolved
tests/chainerx_tests/unit_tests/routines_tests/test_reduction.py
Outdated
Show resolved
Hide resolved
The tests are failing for |
|
Have made the suggested changes. |
tests/chainerx_tests/unit_tests/routines_tests/test_reduction.py
Outdated
Show resolved
Hide resolved
@asi1024 I have added the backward implementation. The backward tests pass but the double backward tests fail. Could you have a look at the implementation please? |
Have rebased with master to include bug fix in |
if (axis.has_value()) { | ||
bctx.input_grad() = Flip(Cumsum(Flip(gout, axis_norm), axis_norm), axis_norm); | ||
} else { | ||
Array input_grad = Flip(Cumsum(Flip(gout, 0), 0), 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gout
will be flipped twice during the double-backward. It can be reduced.
I have added a |
Is this ready to merge @asi1024 ? Can I go ahead with |
Jenkins, test this please. |
Jenkins CI test (for commit 227778f, target branch master) succeeded! |
LGTM. Thank you for the PR! |
Add
chainerx.cumsum
.