Skip to content

Instantly share code, notes, and snippets.

@NMZivkovic
Created July 20, 2019 10:24
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 NMZivkovic/50497b8c8454067338c47bac879a4cd9 to your computer and use it in GitHub Desktop.
Save NMZivkovic/50497b8c8454067338c47bac879a4cd9 to your computer and use it in GitHub Desktop.
def _build_compile_model(self):
model = Sequential()
model.add(Conv2D(32, 8, strides=(4, 4), padding="valid",activation="relu",
input_shape = self._image_shape))
model.add(Conv2D(64, 4, strides=(2, 2), padding="valid", activation="relu",
input_shape = self._image_shape))
model.add(Conv2D(64, 3, strides=(1, 1), padding="valid",activation="relu",
input_shape = self._image_shape))
model.add(Flatten())
model.add(Dense(512, activation="relu"))
model.add(Dense(self._action_size))
huber = Huber()
model.compile(loss = huber,
optimizer=self._optimizer,
metrics=["accuracy"])
return model
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment