MCPcopy Create free account
hub / github.com/MegaScenes/nvs / __init__

Method __init__

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

__len__Method · 0.95

Tested by

no test coverage detected