(self, xy, batch)
| 283 | return offsets |
| 284 | |
| 285 | def interleave(self, xy, batch): |
| 286 | nu = len(xy) - 1 |
| 287 | offsets = self.interleave_offsets(batch, nu) |
| 288 | xy = [[v[offsets[p]:offsets[p + 1]] for p in range(nu + 1)] for v in xy] |
| 289 | for i in range(1, nu + 1): |
| 290 | xy[0][i], xy[i][i] = xy[i][i], xy[0][i] |
| 291 | return [torch.cat(v, dim=0) for v in xy] |
| 292 | |
| 293 | |
| 294 | if __name__ == "__main__": |
nothing calls this directly
no test coverage detected