MCPcopy Create free account
hub / github.com/TrustAIResearch/MLHospital / IndicesDataset

Class IndicesDataset

mlh/data_preprocessing/data_loader.py:416–425  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

414
415
416class IndicesDataset:
417 def __init__(self, dataset, indices=None):
418 self.dataset = dataset
419 self.indices = range(len(dataset)) if (indices is None) else indices
420
421 def __getitem__(self, i):
422 return self.dataset[self.indices[i]]
423
424 def __len__(self):
425 return len(self.indices)
426
427
428class TriggerTrans:

Callers 1

get_data_loaderMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected