MCPcopy Create free account
hub / github.com/IceClear/StableSR / __init__

Method __init__

ldm/data/base.py:9–16  ·  view source on GitHub ↗
(self, num_records=0, valid_ids=None, size=256)

Source from the content-addressed store, hash-verified

7 Define an interface to make the IterableDatasets for text2img data chainable
8 '''
9 def __init__(self, num_records=0, valid_ids=None, size=256):
10 super().__init__()
11 self.num_records = num_records
12 self.valid_ids = valid_ids
13 self.sample_ids = valid_ids
14 self.size = size
15
16 print(f'{self.__class__.__name__} dataset contains {self.__len__()} examples.')
17
18 def __len__(self):
19 return self.num_records

Callers

nothing calls this directly

Calls 1

__len__Method · 0.95

Tested by

no test coverage detected