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

Method __init__

data/samplers.py:18–20  ·  view source on GitHub ↗
(self, indices)

Source from the content-addressed store, hash-verified

16 """
17
18 def __init__(self, indices):
19 self.epoch = 0
20 self.indices = indices
21
22 def __iter__(self):
23 return (self.indices[i] for i in torch.randperm(len(self.indices)))

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected