(self, batch, nu)
| 296 | self.print_fn('model loaded') |
| 297 | |
| 298 | def interleave_offsets(self, batch, nu): |
| 299 | groups = [batch // (nu + 1)] * (nu + 1) |
| 300 | for x in range(batch - sum(groups)): |
| 301 | groups[-x - 1] += 1 |
| 302 | offsets = [0] |
| 303 | for g in groups: |
| 304 | offsets.append(offsets[-1] + g) |
| 305 | assert offsets[-1] == batch |
| 306 | return offsets |
| 307 | |
| 308 | def interleave(self, xy, batch): |
| 309 | nu = len(xy) - 1 |