問題文
A DataLoader is created with shuffle enabled. What does the loader do internally to honor that setting for a map-style dataset?
選択肢
- It relies on the dataset to return samples in random order.
- It reads the whole dataset and then permutes the batches.
- It constructs a sampler that produces indices in random order, based on the value of the shuffle argument.
- It rewrites the dataset in memory so that the samples are stored in a permuted order, which is why the setting can only be used with datasets small enough to fit entirely in memory.