C3 W1 Lab: Data generator

Why the data_generator is not implemented in vectorized form?
In the notebook example, random.shuffle is called for every example in the batch.
Is it possible to use a vector of random integers (of size = batch size) instead?


The data_generator implemented here is just for learning purposes. In subsequent assignments trax.data will be used instead.

Unfortunately, such for loops have been used from Course 1 to the end of Course 3, which makes me think whether it is actually being used in the real world.

I don’t think it is a good way to teach for the practical purposes.

I appreciate your point. Let me pass this on to the team so it can be taken on board for future revisions. @Mubsi