This commit patches a bug which was introduced when I implemented randomized mini-batches. The problem is that when creating the random mini-batches, the scan positions and data may be reordered, but only the scan positions are returned. This causes the scan positions and data to become out of sync. The solution to this problem is to resort the scan positions before returning them so that they are in the same order as the original provided data.
Purpose
This commit patches a bug which was introduced when I implemented randomized mini-batches. The problem is that when creating the random mini-batches, the scan positions and data may be reordered, but only the scan positions are returned. This causes the scan positions and data to become out of sync. The solution to this problem is to resort the scan positions before returning them so that they are in the same order as the original provided data.