MCPcopy Create free account
hub / github.com/DSL-Lab/StreamSplat / fps

Function fps

utils/general_utils.py:153–161  ·  view source on GitHub ↗
(x, k)

Source from the content-addressed store, hash-verified

151 return idx.long(), dists.view(b, n, k)
152
153def fps(x, k):
154 b, n, _ = x.shape
155 x = x.view(-1, 3).contiguous()
156 offset = torch.full((b,), n, dtype=torch.long, device=x.device)
157 new_offset = torch.full((b,), k, dtype=torch.long, device=x.device)
158 offset = torch.cumsum(offset, dim=0).int()
159 new_offset = torch.cumsum(new_offset, dim=0).int()
160 idx = furthestsampling(x, offset, new_offset).long()
161 return idx
162
163class CosineWarmupScheduler(LRScheduler):
164 def __init__(self, optimizer, warmup_iters: int, max_iters: int, initial_lr: float = 1e-10, last_iter: int = -1, min_lr: float = 0.0, decay: bool = True):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected