LSTM/RNN model fails on new test data - TFLearn
It looks like you are using the same training and test data for each iteration. This is causing your model to be overfit.

You need to use cross-validation. I would recommend using fewer training iterations and doing the following:


Split your training data into k chunks where k is your number of training iterations
At each training iteration make your training set by combining k-1 chunks and your validation data the remaining chunk. Note that this should be done so that your validation and training sets are never the same across two training iterations. Additionally the same chunk should never be in both your train and validation sets.


You can keep the the accuracy metrics on each training iteration if you want to see how your model's accuracy is converging, but the true accuracy of your model can only be measured on a holdout set which was not used in this validation scheme. 

If you have enough data I would recommend doing an 80/20 train/validation initial split on your data, doing steps 1 and 2 on the 80% split and measuring the accuracy on the 20% split. 

If you really want to be careful and have a lot of data you could do the following:


Perform a 60/20/20 train/validation/test split
Split both the train and validation sets by the number of iterations you are using.
At each iteration, use k-1 chunks of training data and validate against one chunk from the separate validation set.