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

how to shuffle batches with the iterator? #77

Open
xljhtq opened this issue Jan 30, 2019 · 1 comment
Open

how to shuffle batches with the iterator? #77

xljhtq opened this issue Jan 30, 2019 · 1 comment

Comments

@xljhtq
Copy link

xljhtq commented Jan 30, 2019

Hi, I have read the code completely and I appreciate your code style. So I want to know how to complete shuffling mini-batches in the code Because there exists no the function in your code ??

@xljhtq xljhtq changed the title how to shuffle batches with the iteration? how to shuffle batches with the iterator? Jan 30, 2019
@guillaumegenthial
Copy link
Owner

Hi @xljhtq ,

Good point, there is no shuffling. I invite you to look at my recent implementation that uses tf.data shuffle operation.
If you want to do shuffling on your own with this version of the code, the easier is to probably modify the minibatches function in model/data_utils.py. You would load the entire dataset into a list, shuffle this list (use google + stackoverflow) and then yield batches from this list.

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

2 participants