【发布时间】:2023-03-12 23:30:02
【问题描述】:
我是这个领域的新手。我在互联网上搜索,但找不到解决方案。我正在等待对此领域感兴趣的人的帮助。
我的模型
def load_VGG16_model():
base_model = VGG16(weights='imagenet', include_top=False, input_shape=(256,256,3))
print("Model loaded..!")
return base_model
模型总结
load_VGG16_model().summary()
添加图层
def action_model(shape=(30, 256, 256, 3), nbout=len(classes)):
convnet = load_VGG16_model()
model = Sequential()
model.add(TimeDistributed(convnet, input_shape=shape))
model.add(LSTM(30,return_sequences=True,input_shape=(30,512))) # the error shows this line.
top_model.add(Dense(4096, activation='relu', W_regularizer=l2(0.1)))
top_model.add(Dropout(0.5))
top_model.add(Dense(4096, activation='relu', W_regularizer=l2(0.1)))
top_model.add(Dropout(0.5))
model.add(Dense(nbout, activation='softmax'))
return model
model.add(LSTM(30,return_sequences=True,input_shape=(30,512))) ==>错误显示这一行。
【问题讨论】:
标签: machine-learning deep-learning artificial-intelligence lstm conv-neural-network