Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A bug in assignment2 tensorflow.ipynb #237

Open
ghost opened this issue Aug 14, 2020 · 0 comments
Open

A bug in assignment2 tensorflow.ipynb #237

ghost opened this issue Aug 14, 2020 · 0 comments

Comments

@ghost
Copy link

ghost commented Aug 14, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants