The code might be correct, but since I don’t have the data you could check some samples and make sure they are properly normalized.



 the_coder:

While training the loss is decreasing, and after about 20 epoch it is 0. So i dont understand why i am getting 0% accuracy for the test set. Is my transformation code is correct?


A 0% accuracy during testing might not necessarily be created by a wrong transformation.
Since you would expect to get at least the random accuracy, I would suggest to print some predictions as well as the targets and check, if the accuracy is really 0 or if you are calculating the accuracy in a wrong way.