1

When enabling the shuffle of the data using a NDArrayIter, do you know is the shuffling happens once at the beginning, or the data is re-shuffled at the end of each epoch?

Many thanks!

HALMTL
  • 39
  • 3

2 Answers2

1

Shuffle will happen once at the beginning when creating the iterator.

kevinthesun
  • 336
  • 1
  • 5
  • Well... by the way, isn't it a good idea to re-shuffle the data after each epoch to avoid a cyclic pattern - even more once the network has converged? – HALMTL Jan 17 '17 at 03:47
0

The shuffling only happens once.

Extending NDArrayIter would be a good idea.

It should probably be an option on the reset() call to reshuffle.

This way, each epoch actually sees a new rearrangement of data in the batches during iterations.

It is a real missing function on this Iterator implementation given its goal.

The documentation says one can build one's own iterator. I've not tried this yet.