Skip to content

Instantly share code, notes, and snippets.

@VincentTatan
Created May 22, 2020 06:54
Show Gist options
  • Save VincentTatan/1eee3e721947798b15d42e8d477b48c8 to your computer and use it in GitHub Desktop.
Save VincentTatan/1eee3e721947798b15d42e8d477b48c8 to your computer and use it in GitHub Desktop.
model = tf.keras.Sequential([
tf.keras.layers.Embedding(vocab_size, embedding_dim, input_length=max_length),
tf.keras.layers.GlobalAveragePooling1D(),
tf.keras.layers.Dense(24, activation='relu'),
tf.keras.layers.Dense(1, activation='sigmoid')
])
model.compile(loss='binary_crossentropy',optimizer='adam',metrics=['accuracy'])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment