vits
vits copied to clipboard
about sampler buckets in dataloader
code in lines 323 in data_utils.py:
for i in range(len(buckets) - 1, 0, -1):
if len(buckets[i]) == 0:
buckets.pop(i)
self.boundaries.pop(i+1)
it return the left num in function "_bisect", which means the below store way(for example):
so, I think "buckets" shuld start with "len(buckets) - 2", end with "-1", like below:
for i in range(len(buckets) - 2, -1, -1):
if len(buckets[i]) == 0:
buckets.pop(i)
self.boundaries.pop(i+1)