-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Open
Labels
function requestA request for a new function or the addition of new arguments/modes to an existing function.A request for a new function or the addition of new arguments/modes to an existing function.triagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module
Description
🚀 Feature
Add reverse
option to torch.cumsum
, such as in tensorflow
Motivation
This would compute right to left cumulative sum more efficiently. Currently, as far as I know, the only way to do it is
x = torch.arange(9).view(3, 3)
r2lcumsum = th.flip(th.cumsum(th.flip(x, [1]), 1), [1])
Result should be:
tensor([[ 3, 3, 2],
[12, 9, 5],
[21, 15, 8]])
Pitch
Add reverse
arg to native cumsum
function
Alternatives
Additional context
vadimkantorov, pl0xz0rz, fabriz-io, lematt1991, ezkhrv and 46 more
Metadata
Metadata
Assignees
Labels
function requestA request for a new function or the addition of new arguments/modes to an existing function.A request for a new function or the addition of new arguments/modes to an existing function.triagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module