(self, xy, batch)
| 251 | return offsets |
| 252 | |
| 253 | def interleave(self, xy, batch): |
| 254 | nu = len(xy) - 1 |
| 255 | offsets = self.interleave_offsets(batch, nu) |
| 256 | xy = [[v[offsets[p]:offsets[p + 1]] for p in range(nu + 1)] for v in xy] |
| 257 | for i in range(1, nu + 1): |
| 258 | xy[0][i], xy[i][i] = xy[i][i], xy[0][i] |
| 259 | return [torch.cat(v, dim=0) for v in xy] |
| 260 | |
| 261 | |
| 262 | if __name__ == "__main__": |
nothing calls this directly
no test coverage detected