How to give a 3D Tensor as input to LSTM
LSTM takes as input 3 dimension tensors (batch_size,time_step,input). So before adding a LSTM() layer you need to either use Flatten() or TimeDistributed(Flatten()) layer.