MCPcopy Create free account
hub / github.com/MzeroMiko/mamba-mini / rev_comsum_dim_2

Method rev_comsum_dim_2

test_selective_scan_easy.py:690–692  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

688 delta_softplus = ctx.delta_softplus
689 doys = doys.view(B, G, D, L).permute(0, 1, 3, 2)
690 def rev_comsum_dim_2(x):
691 cum_sum = torch.cumsum(x, dim=2)
692 return (x - cum_sum + cum_sum[:,:,-1:None])
693
694 dus = None
695 dDs = None

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected