(self)
| 197 | return self.total_batches |
| 198 | |
| 199 | def __iter__(self): |
| 200 | assert self.bucket_boundaries is not None |
| 201 | assert self.dataset_lengths is not None |
| 202 | assert self.global_idxs is not None |
| 203 | # group batches |
| 204 | self._batching() |
| 205 | self.batch_idx = 0 |
| 206 | return self |
| 207 | |
| 208 | def __next__(self): |
| 209 | if self.batch_idx < self.total_batches: |