(self, xy, batch)
| 266 | return offsets |
| 267 | |
| 268 | def interleave(self, xy, batch): |
| 269 | nu = len(xy) - 1 |
| 270 | offsets = self.interleave_offsets(batch, nu) |
| 271 | xy = [[v[offsets[p]:offsets[p + 1]] for p in range(nu + 1)] for v in xy] |
| 272 | for i in range(1, nu + 1): |
| 273 | xy[0][i], xy[i][i] = xy[i][i], xy[0][i] |
| 274 | return [torch.cat(v, dim=0) for v in xy] |
| 275 | |
| 276 | |
| 277 | if __name__ == "__main__": |
nothing calls this directly
no test coverage detected