Skip to content

Instantly share code, notes, and snippets.

@hanneshapke
Created March 20, 2020 19:00
Show Gist options
  • Save hanneshapke/8d1562f78f0632197b0af407b0ded211 to your computer and use it in GitHub Desktop.
Save hanneshapke/8d1562f78f0632197b0af407b0ded211 to your computer and use it in GitHub Desktop.
x = tf.keras.layers.Dense(256, activation='relu')(pooled_output)
dense = tf.keras.layers.Dense(64, activation='relu')(x)
pred = tf.keras.layers.Dense(1, activation='sigmoid')(dense)
model = tf.keras.Model(
inputs=[inputs['input_word_ids'],
inputs['input_mask'],
inputs['input_type_ids']],
outputs=pred
)
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