(self)
| 94 | self.batch_bias = [i * (num_samples // batch_size) for i in range(batch_size)] |
| 95 | |
| 96 | def __iter__(self): |
| 97 | for idx in range(self.start_iter, self.train_iters * 10): |
| 98 | batch = [(idx + bias) % self.num_samples for bias in self.batch_bias] |
| 99 | tbatch = self._batch(batch) |
| 100 | yield tbatch |
| 101 | |
| 102 | def __len__(self): |
| 103 | return self.train_iters |