The model is trained fine but when testing it is showing error

I trained the model with RNN and Added some hidden weights. It is working fine on testing and validation but when coming to testing it is not working I did same preprocessing and checked several times but I not find how to solve the error. [


You can view my code in

You should check the labels values for your test set to make sure they are correct.
Also you can run the same code on the CPU to get a better error message.