python – Keras LSTM输入维度设置

python – Keras LSTM输入维度设置

我试图用keras训练LSTM模型,但我觉得我在这里弄错了. 我收到了错误 ValueError: Error when checking input: expected lstm_17_input to have 3 dimensions, but got array with shape (10000, 0, 20) 而我的代码看起来像 model = Sequential()model.a

python – 在keras的LSTM中使用隐藏状态而不是输出

python – 在keras的LSTM中使用隐藏状态而不是输出

我希望在 Yang et al.之前使用注意机制的实现.我找到了一个使用此注意机制 here的自定义层的工作实现.而不是使用我的LSTM的输出值: my_lstm = LSTM(128, input_shape=(a, b), return_sequences=True)my_lstm = AttentionWithContext()(my_lstm)out = Dense(2

联系我们

联系我们

0577-28828765

在线咨询: QQ交谈

邮箱: xwei067@foxmail.com

工作时间:周一至周五,9:00-17:30,节假日休息

返回顶部