Skip to content

Instantly share code, notes, and snippets.

@jamescalam
Last active April 1, 2020 18:58
Show Gist options
  • Save jamescalam/12f9667ffb42ad283980c0ff3566fa1f to your computer and use it in GitHub Desktop.
Save jamescalam/12f9667ffb42ad283980c0ff3566fa1f to your computer and use it in GitHub Desktop.
Model definition for simple GRU network in TF Keras.
model = tf.keras.Sequential([
tf.keras.layers.Embedding(len(vocab), EMBED_DIM,
batch_input_shape=[BATCH_SIZE, None]),
tf.keras.layers.GRU(UNITS, return_sequences=True,
stateful=True,
dropout=0.1),
tf.keras.layers.Dense(len(vocab))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment