mirror of
https://github.com/open-mmlab/mmclassification.git
synced 2025-06-03 21:53:55 +08:00
fix bug (#108)
This commit is contained in:
parent
400074c321
commit
92438da12a
@ -29,7 +29,9 @@ class DistributedSampler(_DistributedSampler):
|
||||
|
||||
# add extra samples to make it evenly divisible
|
||||
if self.round_up:
|
||||
indices += indices[:(self.total_size - len(indices))]
|
||||
indices = (
|
||||
indices *
|
||||
int(self.total_size / len(indices) + 1))[:self.total_size]
|
||||
assert len(indices) == self.total_size
|
||||
|
||||
# subsample
|
||||
|
Loading…
x
Reference in New Issue
Block a user