(offset)
| 34 | |
| 35 | @torch.inference_mode() |
| 36 | def offset2batch(offset): |
| 37 | bincount = offset2bincount(offset) |
| 38 | return torch.arange( |
| 39 | len(bincount), device=offset.device, dtype=torch.long |
| 40 | ).repeat_interleave(bincount) |
| 41 | |
| 42 | |
| 43 | @torch.inference_mode() |
no test coverage detected