Created
August 29, 2018 17:25
-
-
Save jkotra/bf840811484e9f858f3d1b9ee10f498f to your computer and use it in GitHub Desktop.
taxi-dnn
This file contains 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, Model | |
from keras.layers import Dense, Dropout, Activation | |
from keras import optimizers | |
from keras import regularizers | |
model = Sequential() | |
model.add(Dense(128, activation='relu', input_dim=len(features))) | |
model.add(Dense(64)) | |
model.add(Dense(1)) | |
model.compile(loss='mse', optimizer='adam') | |
history = model.fit(x=X_train, | |
y=y_train, | |
batch_size=500, | |
epochs=300, | |
verbose=1, | |
validation_data=(X_test, y_test), | |
shuffle=True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment