MCPcopy Create free account
hub / github.com/SwinTransformer/Transformer-SSL / __iter__

Method __iter__

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected