MCPcopy Create free account
hub / github.com/CSAILVision/gandissect / __init__

Method __init__

netdissect/sampler.py:53–58  ·  view source on GitHub ↗
(self, data_source, start=None, end=None, seed=1)

Source from the content-addressed store, hash-verified

51 seed (optional)
52 """
53 def __init__(self, data_source, start=None, end=None, seed=1):
54 rng = random.Random(seed)
55 shuffled = list(range(len(data_source)))
56 rng.shuffle(shuffled)
57 self.data_source = data_source
58 super(FixedRandomSubsetSampler, self).__init__(shuffled[start:end])
59
60 def class_subset(self, class_filter):
61 '''

Callers

nothing calls this directly

Calls 2

rangeFunction · 0.50
__init__Method · 0.45

Tested by

no test coverage detected