且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在预训练的CNN之上的LSTM

更新时间:2022-06-26 01:22:21

您也可以将cnn_model包装在TimeDistributed包装器中.

You can wrap your cnn_model also in a TimeDistributed wrapper.

frames = Input(shape=(5, 224, 224, 3))
x = TimeDistributed(cnn_model)(frames)
x = TimeDistributed(Flatten())(x)
x = LSTM(neurons, dropout=dropout, name='lstm')(x)
out = Dense(n_output, kernel_initializer=weight_init, name='out')(x)
model = Model(inputs=frames, outputs=out)