Created
December 18, 2017 14:06
-
-
Save AurelianTactics/85e802993bdf3b84df7f148ff59c1789 to your computer and use it in GitHub Desktop.
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
def build_model(): | |
model = Sequential() | |
model.add(Conv2D(32, kernel_size=(8,8),strides=(4, 4), padding='same', | |
activation='relu', input_shape=(img_rows,img_cols,img_channels), | |
kernel_initializer=initializers.glorot_normal(seed=31))) | |
model.add(Conv2D(64,kernel_size=(4,4),strides=(2,2),padding='same',activation='relu', | |
kernel_initializer=initializers.glorot_normal(seed=31))) | |
model.add(Conv2D(64,kernel_size=(3,3),strides=(1,1),padding='same',activation='relu', | |
kernel_initializer=initializers.glorot_normal(seed=31))) | |
model.add(Flatten()) | |
model.add(Dense(512, activation='relu', | |
kernel_initializer=initializers.glorot_normal(seed=31))) | |
model.add(Dense(ACTIONS, | |
kernel_initializer=initializers.glorot_normal(seed=31))) | |
adam = Adam(lr=LEARNING_RATE,clipvalue=1.0) | |
model.compile(loss='mse',optimizer=adam) | |
return model |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment