(x, k)
| 151 | return idx.long(), dists.view(b, n, k) |
| 152 | |
| 153 | def 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 | |
| 163 | class 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): |
nothing calls this directly
no outgoing calls
no test coverage detected