Solved it. There was a file responsible for the Dataset creation and because I am running on Windows while this code was implemented in Linux, I had to modify some parts of the code that created newline characters and were relevant with the path. Thank you so much for your patience and I am sorry that you spent your time to debug something that didn’t have to do with PyTorch. I wish you a happy remainder of the day.