Closed rraju1 closed 2 years ago
I found out my error. What I was doing was including adding an indices array where you can have the same index the loader draws samples from (sampling with replacement). The loader expects unique indices to sample from or else it throws an error so when I set the replace option to False in np.random.choice, my code works.
Hi, @rraju1! Why do you set loader.traversal_order = QuasiRandom(loader)
instead of just setting loader.traversal_order.indices = set2
, as you said in https://github.com/libffcv/ffcv/issues/152#issuecomment-1041024724? Thanks!
Hi, thanks for the amazing package. I am trying to use ffcv for one of my tasks where we train on different subsets of data at different points in training. Sometimes it involves taking random subsets from the dataset. Unfortunately, I get this
ValueError: empty range for randrange()
after sampling. Based on the trace, it looks the error happens inquasi_random.py
but I'm not sure where this call for the randrange function is executed. I have a MWE showing the error.Trace:
MWE: