Created
April 30, 2018 20:07
-
-
Save dvgodoy/86591c9796731c21f920e01ed2376b23 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from keras.models import Sequential | |
from keras.layers import Dense | |
from keras.optimizers import SGD | |
from keras.initializers import glorot_normal, normal | |
model = Sequential() | |
model.add(Dense(input_dim=2, | |
units=2, | |
activation='sigmoid', | |
kernel_initializer=glorot_normal(seed=42), | |
name='hidden')) | |
model.add(Dense(units=1, | |
activation='sigmoid', | |
kernel_initializer=normal(seed=42), | |
name='output')) | |
model.compile(loss='binary_crossentropy', optimizer=SGD(lr=0.05), metrics=['acc']) | |
model.fit(X, y, epochs=150, batch_size=16, callbacks=[replaydata]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment