Skip to content

Instantly share code, notes, and snippets.

@JannesKlaas
Last active October 21, 2017 15:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JannesKlaas/04568ef70f274460113626b9dc56f131 to your computer and use it in GitHub Desktop.
Save JannesKlaas/04568ef70f274460113626b9dc56f131 to your computer and use it in GitHub Desktop.
num_actions = 3 # [move_left, stay, move_right]
hidden_size = 100 # Size of the hidden layers
grid_size = 10 # Size of the playing field
def baseline_model(grid_size,num_actions,hidden_size):
#seting up the model with keras
model = Sequential()
model.add(Dense(hidden_size, input_shape=(grid_size**2,), activation='relu'))
model.add(Dense(hidden_size, activation='relu'))
model.add(Dense(num_actions))
model.compile(sgd(lr=.1), "mse")
return model
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment