-
Notifications
You must be signed in to change notification settings - Fork 6.8k
global shuffling #14489
Comments
Thank you for submitting the issue! I'm labeling it so the MXNet community members can help resolve it. @mxnet-label-bot add [Feature request, Backend, Data-loading] |
Adding idx file to ImagerecordIter should result in globally shuffled images. |
Thanks for the quick response. I added the idx file, and I still don't seem to be getting a global shuffle. Here's how I'm setting up the ImageRecordIter_v1 (I'm using v1 so that I can directly access the index. It seems ImageRecordIter returns only zeros for the index).
Does the global shuffle only work with ImageRecordIter? If so, is there any way to get ImageRecordIter to return the correct indices? Thanks! |
I'm not sure what do you mean by returning index. The |
Sorry I wasn't clear about that. By index I mean the value in the first column of the .lst file used to generate the .rec and .idx files. Each batch of the iterator has fields for batch.data, batch.label, and batch.index.
When using ImageRecordIter_v1, batch.index returns the index of the image, corresponding to the first column of the .lst file. However, when using ImageRecordIter, batch.index returns all zeros! The reason I was using ImageRecordIter_v1 was because it returns the correct index value, which I need to train my model (it also seemed to be loading images faster). Is it possible to have ImageRecordIter return the correct image index (first column of .lst file)? Thanks! |
Hmmm, seems like a bug in |
I can confirm that |
Please do. Did you confirm that you get global shuffling with ImageRecordIter with index provided? |
I have mxnet version 1.4.0, and I'm using ImageRecordIter or ImageRecordIter_v1 and wondering if it is possible to globally shuffle images, rather than shuffling by batch? I'm training a model where the structure resulting from batch-wise shuffling actually dramatically impairs learning, so I need a way to globally shuffle.
Thanks!
The text was updated successfully, but these errors were encountered: