mxnet icon indicating copy to clipboard operation
mxnet copied to clipboard

I am confused about 'SHUFFLE' in mxnet.io.ImageRecordIter

Open alecwangcq opened this issue 10 years ago • 5 comments

Since my input .rec is not shuffled... So, I set: def get_iterator(args, kv): data_shape = (1, 64, 64) train = mx.io.ImageRecordIter( path_imgrec = args.data_dir + "train.rec", mean_img = args.data_dir + "mean.bin", data_shape = data_shape, batch_size = args.batch_size, shuffle = True, rand_crop = True, rand_mirror = False, num_parts = kv.num_workers, part_index = kv.rank)

Is this shuffle all the data set? or only batch by batch?

alecwangcq avatar May 14 '16 08:05 alecwangcq

mx.io.ImageRecordIter shuffle data within chunks

dsqx71 avatar May 17 '16 03:05 dsqx71

@dsqx71 answers the question precisely

tqchen avatar May 19 '16 18:05 tqchen

@dsqx71 @tqchen Hello, I'm new to mxnet and I find out the shuffle options both in mx.io.ImageRecordIter and im2rec.py are chunk-wise(please correct me if I'm wrong), which makes shuffling inadequate. Currently I'm shuffling the data list manually before create Record but it's kind of annoying. Is there any way to shuffle within the whole dataset using mxnet API? Thank you in advance!

knwng avatar Aug 17 '18 03:08 knwng

mx.io.ImageRecordIter shuffle data within chunks

prefect

guker avatar Oct 25 '18 15:10 guker

mx.io.ImageRecordIter shuffle data within chunks what is chunk? is it prefetched data?

guker avatar Oct 25 '18 15:10 guker