MCPcopy Create free account
hub / github.com/MotrixLab/MotionDiffuse / __init__

Method __init__

text2motion/datasets/dataloader.py:18–30  ·  view source on GitHub ↗
(self,
                 dataset,
                 num_replicas=None,
                 rank=None,
                 shuffle=True,
                 round_up=True)

Source from the content-addressed store, hash-verified

16class DistributedSampler(_DistributedSampler):
17
18 def __init__(self,
19 dataset,
20 num_replicas=None,
21 rank=None,
22 shuffle=True,
23 round_up=True):
24 super().__init__(dataset, num_replicas=num_replicas, rank=rank)
25 self.shuffle = shuffle
26 self.round_up = round_up
27 if self.round_up:
28 self.total_size = self.num_samples * self.num_replicas
29 else:
30 self.total_size = len(self.dataset)
31
32 def __iter__(self):
33 # deterministically shuffle based on epoch

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected