MCPcopy Create free account
hub / github.com/1998v7/SNSCL / load_split

Method load_split

dataloader/dogs_loader.py:117–127  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

115 return image, target, index
116
117 def load_split(self):
118 if self.train:
119 split = scipy.io.loadmat(join(self.root, 'train_list.mat'))['annotation_list']
120 labels = scipy.io.loadmat(join(self.root, 'train_list.mat'))['labels']
121 else:
122 split = scipy.io.loadmat(join(self.root, 'test_list.mat'))['annotation_list']
123 labels = scipy.io.loadmat(join(self.root, 'test_list.mat'))['labels']
124
125 split = [item[0][0] for item in split]
126 labels = [item[0] - 1 for item in labels]
127 return list(zip(split, labels)), split, labels
128
129 def stats(self):
130 counts = {}

Callers 1

__init__Method · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected