MCPcopy Create free account
hub / github.com/KeepTryingTo/Pytorch-GAN / __init__

Method __init__

Code/datasets.py:17–28  ·  view source on GitHub ↗
(self,root_vango,root_photo,transform=None)

Source from the content-addressed store, hash-verified

15
16class vanGoPhotoDataset(Dataset):
17 def __init__(self,root_vango,root_photo,transform=None):
18 super(vanGoPhotoDataset, self).__init__()
19 self.root_vango = root_vango
20 self.root_photo = root_photo
21 self.transform = transform
22
23 self.vango_Images = os.listdir(self.root_vango)
24 self.photo_Images = os.listdir(self.root_photo)
25
26 self.length_dataset = max(len(self.vango_Images),len(self.photo_Images))
27 self.vango_len = len(self.vango_Images)
28 self.photo_len = len(self.photo_Images)
29
30 def __len__(self):
31 return self.length_dataset

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected