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