I get it, thanks a lot! Didn’t really think about the pin_memory method. I didn’t had much success with using num_workers > 0 and returning anything else than an iterable of tensors, but maybe the problem lies somewhere else.