MCPcopy Create free account
hub / github.com/InternRobotics/G2VLM / _pad_cumsum

Function _pad_cumsum

eval_code/recons/models/moge/utils/alignment.py:44–45  ·  view source on GitHub ↗
(cumsum: torch.Tensor)

Source from the content-addressed store, hash-verified

42
43
44def _pad_cumsum(cumsum: torch.Tensor):
45 return torch.cat([torch.zeros_like(cumsum[..., :1]), cumsum, cumsum[..., -1:]], dim=-1)
46
47
48def _compute_residual(a: torch.Tensor, xyw: torch.Tensor, trunc: float):

Callers 1

alignFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected