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

Method rev_comsum

test_selective_scan_easy.py:193–195  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

191 doys = doys.view(B, G, D, L).permute(3, 0, 1, 2)
192
193 def rev_comsum(x):
194 cum_sum = torch.cumsum(x, dim=0)
195 return (x - cum_sum + cum_sum[-1:None])
196
197 if DEBUG:
198 dtype = torch.float32

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected