MCPcopy Create free account
hub / github.com/MotrixLab/ViMoGen / DummyDataset

Class DummyDataset

trainer/__init__.py:14–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12 from torch.utils.data import DataLoader, Dataset
13
14 class DummyDataset(Dataset):
15
16 def __init__(self) -> None:
17 super().__init__()
18 data = torch.randn(
19 1,
20 3,
21 1024,
22 1024,
23 )
24 self.data = data.expand(100000, -1, -1, -1)
25
26 def __len__(self, ):
27 return len(self.data)
28
29 def __getitem__(self, index):
30 return (
31 self.data[index],
32 self.data[index],
33 'A cat holding a sign that says hello world',
34 )
35
36 dataset = DummyDataset()
37 train_loader = DataLoader(

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected