MCPcopy Create free account
hub / github.com/pytorch/tutorials / __init__

Method __init__

beginner_source/blitz/data_parallel_tutorial.py:72–74  ·  view source on GitHub ↗
(self, size, length)

Source from the content-addressed store, hash-verified

70class RandomDataset(Dataset):
71
72 def __init__(self, size, length):
73 self.len = length
74 self.data = torch.randn(length, size)
75
76 def __getitem__(self, index):
77 return self.data[index]

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected