Skip to content

Instantly share code, notes, and snippets.

@rdisipio
Created January 16, 2020 18:26
Show Gist options
  • Save rdisipio/ecbec4e952597eaf6f4ef90bef30409b to your computer and use it in GitHub Desktop.
Save rdisipio/ecbec4e952597eaf6f4ef90bef30409b to your computer and use it in GitHub Desktop.
def make_model_classical(n_categories, latent_dim=16, embedding_dim=512):
text_in = keras.Input( shape=(embedding_dim,), dtype=tf.float64, name='text_in') # (None, 512)
x = layers.Dense(latent_dim, activation='tanh', dtype=tf.float64)(text_in)
x_out = layers.Dense(n_categories, activation='softmax')(x)
return keras.Model(inputs=text_in, outputs=x_out, name="ClassicalPreprintClassifier")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment