Try setting num_loaders=0 in dataloader and also reducing batch size-- if you are having GPU issues. I see you are using torch.from_numpy as the transform. If it is slow, try to follow this 6 thread to fasten that up.