Skip to content

Instantly share code, notes, and snippets.

@hanneshapke hanneshapke/
Last active Apr 16, 2018

What would you like to do?
Model definition for the CNN Visualization Demo
sequence_input = Input(shape=(maxlen_text,))
x = Embedding(name='embedding_layer',
x = Dropout(.20)(x)
x = Conv1D(64, 5, activation='relu', name='1-conv1d', padding='same')(x)
x = MaxPooling1D(pool_size=4)(x)
x = Dropout(.20)(x)
x = Conv1D(64, 5, activation='relu', name='2-conv1d', padding='same')(x)
x = MaxPooling1D(pool_size=2)(x)
x = Dropout(.20)(x)
x = Flatten()(x)
output = Dense(units=output_dim,activation='softmax')(x)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.