-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
MnistDatasetFetcher shuffles on reset causing unexpected behavior #6299
Comments
Why must we get the same dataset? |
Thanks for reporting. |
@Charele It is a design choice and of course you could go with the current behavior. Either way, the actual behavior should probably be clearly documented to avoid confusion. In my case I wanted to train a classifier over a number of epochs on a limited set of examples. To do this I used a |
* Another pass on javadoc link formatting * #6299 Mnist iterator subset shuffling repeatability * #6128 fix StackVertex output type * #6101 DataVec ObjectDetectionRecordReader image center validation * #6280 validate and throw exception for invalid loss/activation combinations * Cleanup and fix tests given new validation * Another round of javadoc link fixes * Re-enable some now passing tests * Tweak arbiter max candidates condition to exclude queued candidates * Small final test fix
* Another pass on javadoc link formatting * #6299 Mnist iterator subset shuffling repeatability * #6128 fix StackVertex output type * #6101 DataVec ObjectDetectionRecordReader image center validation * #6280 validate and throw exception for invalid loss/activation combinations * Cleanup and fix tests given new validation * Another round of javadoc link fixes * Re-enable some now passing tests * Tweak arbiter max candidates condition to exclude queued candidates * Small final test fix
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
If the
shuffle
parameter is set on theMnistDatasetFetcher
it will shuffle the dataset on each call toreset
. Below is the relevant code fromMnistDatasetFetcher
:This appears to be a bug. In particular, this seem to cause an
MnistDatasetIterator
constructed withnumExamples
< 60000 to iterate over a new dataset on each call toreset()
. The documentation is not super explicit but this does not seem to be the intended behavior.An example of this is demonstrated by the code below:
Here we construct an iterator over a single example with a batch size of 1. I would expect this iterator to return the same dataset on the first and second call to
next
(after the call toreset
).The text was updated successfully, but these errors were encountered: