Time Series Classification using LSTM
There might be many reasons for NAN's- 

https://stats.stackexchange.com/questions/325451/cost-function-turning-into-nan-after-a-certain-number-of-iterations

https://stackoverflow.com/questions/33962226/common-causes-of-nans-during-training

basically LSTM is not able to train. try changing parameters esp activation function.   

I haven't worked on python but what is the use of metrics=['accuracy']) in ur code, when u have already given cross entropy as loss function.