(self, batch, nu)
| 399 | self.print_fn('model loaded') |
| 400 | |
| 401 | def interleave_offsets(self, batch, nu): |
| 402 | groups = [batch // (nu + 1)] * (nu + 1) |
| 403 | for x in range(batch - sum(groups)): |
| 404 | groups[-x - 1] += 1 |
| 405 | offsets = [0] |
| 406 | for g in groups: |
| 407 | offsets.append(offsets[-1] + g) |
| 408 | assert offsets[-1] == batch |
| 409 | return offsets |
| 410 | |
| 411 | def interleave(self, xy, batch): |
| 412 | nu = len(xy) - 1 |