Understanding Tensorflow LSTM models?
Arsenal,

We have to reshape the input data to fit in the LSTM's input layer like:

   trainX= np.reshape(trainX, (-1, 16, 4096))
   testX = np.reshape(testX, (-1, 16, 4096))


When one layer's output goes to the following layer's input, the earlier layer must produce a sequence like:

    net = tflearn.lstm(net,128, dropout=0.2, return_seq=True)
    net = tflearn.lstm(net,128)
    net = tflearn.fully_connected(net, num_classes, activation='softmax')


Hope this helps.