Open SlinkoIgor opened 4 years ago
I think this would solve the problem, no?
def __getitem__(self, i):
# collect batch data
start = i * self.batch_size
stop = (i + 1) * self.batch_size
data = []
for j in range(start, stop):
data.append(self.dataset[self.indexes[j]]) # <------
# transpose list of lists
batch = [np.stack(samples, axis=0) for samples in zip(*data)]
return batch
It seems like dataset is not shuffled on epoch end: self.indexes is not used in getitem method