MCPcopy Create free account
hub / github.com/LeapLabTHU/DAT / __iter__

Method __iter__

data/samplers.py:24–25  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

22 self.indices = indices
23
24 def __iter__(self):
25 return (self.indices[i] for i in torch.randperm(len(self.indices)))
26
27 def __len__(self):
28 return len(self.indices)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected