r""" Sets the epoch for this sampler. When :attr:`shuffle=True`, this ensures all replicas use a different random ordering for each epoch. Otherwise, the next iteration of this sampler will yield the same ordering. Args: epoch (int): Epoch number.
(self, epoch: int)
| 146 | return self.num_samples |
| 147 | |
| 148 | def set_epoch(self, epoch: int) -> None: |
| 149 | r""" |
| 150 | Sets the epoch for this sampler. When :attr:`shuffle=True`, this ensures all replicas |
| 151 | use a different random ordering for each epoch. Otherwise, the next iteration of this |
| 152 | sampler will yield the same ordering. |
| 153 | |
| 154 | Args: |
| 155 | epoch (int): Epoch number. |
| 156 | """ |
| 157 | self.epoch = epoch |