I fixed my issue, I had a function which imported the files and scaled the data to the range 0-1 which was not behaving properly. Everything is working now. Thanks to everybody helping, even if it didn’t solve my issue (because I didn’t upload enough of the code) it still helped me a understanding how pytorch works.