Skip to content

Instantly share code, notes, and snippets.

@chricke
Created March 26, 2019 09:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chricke/b02b7c2de749ada8f565773219d118b9 to your computer and use it in GitHub Desktop.
Save chricke/b02b7c2de749ada8f565773219d118b9 to your computer and use it in GitHub Desktop.
Build Neural Net
def build_nn(cell, rnn_size, input_data, vocab_size, embed_dim):
embeddings = get_embed(input_data, vocab_size, embed_dim)
inputs, final_state = build_rnn(cell, embeddings)
logits = tf.contrib.layers.fully_connected(inputs=inputs, num_outputs=vocab_size, activation_fn=None)
return logits, final_state
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment