Skip to content

Instantly share code, notes, and snippets.

@NMZivkovic
Created July 7, 2019 12:06
Show Gist options
  • Save NMZivkovic/17c8176e651bccf201ca0ba995de1aa6 to your computer and use it in GitHub Desktop.
Save NMZivkovic/17c8176e651bccf201ca0ba995de1aa6 to your computer and use it in GitHub Desktop.
def _build_compile_model(self):
model = Sequential()
model.add(Embedding(self._state_size, 10, input_length=1))
model.add(Reshape((10,)))
model.add(Dense(50, activation='relu'))
model.add(Dense(50, activation='relu'))
model.add(Dense(self._action_size, activation='linear'))
model.compile(loss='mse', optimizer=self._optimizer)
return model
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment