fix(khaosz/trainer/data_util.py): 修复 RandomSampler 中迭代计数器位置错误

This commit is contained in:
ViperEkura 2025-10-03 22:08:28 +08:00
parent 28b01220b6
commit 9a452dd34e
1 changed files with 1 additions and 1 deletions

View File

@ -297,8 +297,8 @@ class RandomSampler(Sampler[int]):
start = self.current_iter % n
for i in range(start, n):
yield self._indices[i]
self.current_iter += 1
yield self._indices[i]
self.epoch += 1
self._indices = None