Thanks it does seem a bit faster now. Unrelated to the topic, hope could i ask a different question. I tried passing a list of indices to the dataset however the  __getitem__  in the cifar10/coco dataset  returns a Type Error list indices must be integers or slices, not list when running the code. The list of indices is from BatchSampler. Any reason why?