Keras实现LSTM进行情感分析的问题,如何正确增加隐层

源代码如下:

 model = Sequential()
model.add(Embedding(max_features, 256, input_length=maxlen))
model.add(LSTM(output_dim=128, activation='sigmoid', inner_activation='hard_sigmoid'))

为什么总显示错误:
TypeError: Expected int32, got of type 'Variable' instead.

http://blog.csdn.net/william_2015/article/details/72978387