def next(self):
        if self.batch_count >= self.num_batches:
            raise StopIteration()

        else:
            idx = np.random.permutation(
                np.arange(len(self.remain_samples)))[0:self.batch_size]
            self.last = self.remain_samples[idx]
            self.remain_samples = np.setdiff1d(self.remain_samples, self.last)
            self.batch_count += 1
            return self.X[self.last, :, :, :], self.y[self.last]
dataset/ETHPy150Open ifp-uiuc/anna/anna/datasets/supervised_dataset.py/DatasetIteratorRandomUniformNoRep.next/original