MCPcopy Create free account
hub / github.com/TPCD/DCCL / __init__

Method __init__

data/cub.py:20–37  ·  view source on GitHub ↗
(self, root, train=True, transform=None, target_transform=None, loader=default_loader, download=True)

Source from the content-addressed store, hash-verified

18 tgz_md5 = '97eceeb196236b17998738112f37df78'
19
20 def __init__(self, root, train=True, transform=None, target_transform=None, loader=default_loader, download=True):
21
22 self.root = os.path.expanduser(root)
23 self.transform = transform
24 self.target_transform = target_transform
25
26 self.loader = loader
27 self.train = train
28
29
30 if download:
31 self._download()
32
33 if not self._check_integrity():
34 raise RuntimeError('Dataset not found or corrupted.' +
35 ' You can use download=True to download it')
36
37 self.uq_idxs = np.array(range(len(self)))
38
39 def _load_metadata(self):
40 images = pd.read_csv(os.path.join(self.root, 'CUB_200_2011', 'images.txt'), sep=' ',

Callers

nothing calls this directly

Calls 2

_downloadMethod · 0.95
_check_integrityMethod · 0.95

Tested by

no test coverage detected