text_plain_output_1.png
from keras.layers import LSTM, Dense, TimeDistributed, Bidirectional, Embedding, Dropout, Flatten, Layer, Input

from keras.models import Sequential, Model

inp = Input(shape=(100,))
x = Embedding(20000, 256, trainable=False)(inp)
x = Bidirectional(LSTM(300, return_sequences=True, dropout=0.25, recurrent_dropout=0.25))(x)
x = Attention()(x)
x = Dense(256, activation='relu')(x)
x = Dropout(0.25)(x)
x = Dense(1, activation='sigmoid')(x)
model = Model(inputs=inp, outputs=x)
model.summary()