def __iter__(self):
N, B = self.X.shape[0], self.batch_size
idxs = np.arange(N)
if self.shuffle:
np.random.shuffle(idxs)
# Here is the bug, the variable is not used in the generator, so shuffle is not useful
return iter((self.X[i:i+B], self.y[i:i+B]) for i in range(0, N, B))
and I think should be changed like follows![correct](https://user-images.githubusercontent.com/24853152/90213731-1ecd0700-de29-11ea-9ede-654e65c8165e.png)