i'm trying to create the vgg+lstm network. in this code seq_len is 1400.
video = Input(shape=(seq_len, 224, 224,3))
cnn_base = VGG16(input_shape=(224, 224, 3), weights = 'imagenet', include_top=False)
cnn_out = GlobalAveragePooling2D()(cnn_base.output)
cnn = Model(cnn_base.input, cnn_out)
cnn.trainable=False
encoded_frames = TimeDistributed(cnn)(video)
encoded_sequence = LSTM(256)(encoded_frames)
hidden_layer = Dense(1024, activation='relu')(encoded_sequence)
outputs = Dense(1)(hidden_layer)
model = Model(video, outputs)
print(model.summary())
history = model.fit(w_train, y_train, epochs=60, batch_size=50, shuffle=True, validation_split=0.2, verbose=10)
print(history.history.keys())
and my error is this:
ValueError: Input 0 is incompatible with layer model_6: expected shape=(None, 1400, 224, 224, 3), found shape=(None, 224, 224, 3)
anybody can help me to solve?