1-One-to-one
model.add(Dense(output_size, input_shape=input_shape))
2-One-to-many:
model.add(RepeatVector(number_of_times, input_shape=input_shape))
model.add(LSTM(output_size, return_sequences=True))
3-Many-to-one:
model = Sequential()
model.add(LSTM(1, input_shape=(timesteps, data_dim)))
4-Many-to-many
model = Sequential()
model.add(LSTM(1, input_shape=(timesteps, data_dim), return_sequences=True))
扫码关注
实用AI客栈
获取最新AI资讯与实战案例
小编微信号 : langu86
参考链接:https://stackoverflow.com/questions/43034960/many-to-one-and-many-to-many-lstm-examples-in-keras