vits icon indicating copy to clipboard operation
vits copied to clipboard

about sampler buckets in dataloader

Open forwiat opened this issue 2 years ago • 1 comments

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): image 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)

forwiat avatar Apr 24 '22 09:04 forwiat