问题
According to the nature of RNN, we can get an output of predicted probabilities at every time stamp (unfold in time).
Suppose I train an RNN with 5 time steps, each having 6 features. Thus I have to specify the first layer like this(suppose we use a LSTM layer with 20 nodes as the first layer):
model.add(LSTM(20, return_sequences=True, input_shape=(5, 6)))
And the model works well if I input the same dimension data. However, now I want to use first 3 time steps of the data to get the prediction (input shape will be 3, 6), the same syntax will not be accepted.
My question is, is it possible to make such predictions with the same model with keras (without taking first 3 time steps of the training data and train another model)? If yes, how should I deal with the syntax? If no, is there any other RNN packages with LSTM that supports such functionalities?
来源:https://stackoverflow.com/questions/38280766/predict-using-data-with-less-time-steps-different-dimension-using-keras-rnn-mo