Solved by KFrank in post #4 
              
              
                Hello Arnav! 

The idea would be to preprocess your data before you feed it to your 
model. 
Depending on the details of your use case, you could, for example, 
read your original data off of disk (independent of pytorch), construct 
your Y vectors, and then write this preprocessed data back to disk…