Skip to content

Instantly share code, notes, and snippets.

@josete89
Created May 25, 2018 09:14
Show Gist options
  • Save josete89/1ef5ff1283b2294903349f208ae1f012 to your computer and use it in GitHub Desktop.
Save josete89/1ef5ff1283b2294903349f208ae1f012 to your computer and use it in GitHub Desktop.
from keras import regularizers
model = models.Sequential()
model.add(layers.Dense(16, kernel_regularizer=regularizers.l2(0.001),
activation='relu', input_shape=(10000,)))
model.add(layers.Dense(16, kernel_regularizer=regularizers.l2(0.001),
activation='relu'))
model.add(layers.Dense(1, activation='sigmoid'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment