What did you assign to train.pt and how did you load your data in your Dataset?
If you’ve loaded it lazily, you won’t be able to store the DataLoader including the loaded files, as the DataLoader does not store the data internally.