MCPcopy Create free account
hub / github.com/OpenDriveLab/ReSim / FakeDataset

Class FakeDataset

SwissArmyTransformer/tests/test_train.py:97–103  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

95
96
97class FakeDataset(TensorDataset):
98 def __init__(self, process_fn=None, *args, **kwargs):
99 super().__init__(*args, **kwargs)
100 self.process_fn = process_fn
101
102 def __getitem__(self, idx):
103 return self.process_fn(super().__getitem__(idx))
104
105def create_dataset_function(path, args):
106 num_samples = 100000

Callers 1

create_dataset_functionFunction · 0.70

Calls

no outgoing calls

Tested by 1

create_dataset_functionFunction · 0.56