def initialize_model(self):
    conv_layers = self.conv_layers[:]
    first_conv_layer = conv_layers.pop(0)
    i1 = Input(shape=self.combined_observation_space[0])
    i2 = Input(shape=self.combined_observation_space[1])
    x = Conv2D(first_conv_layer, 8, 4, padding='same', activation='relu')(i1)
    for conv_layer in conv_layers:
        x = Conv2D(conv_layer, 3, 4, padding='same', activation='relu')(x)
    x = Flatten()(x)
    x = Concatenate(axis=1)([x, i2])
    layer = self.fc_layers[:]
    first_layer = layer.pop(0)
    x = Dense(first_layer, activation='relu')(x)
    for layer in layer:
        x = Dense(layer, activation='relu')(x)
    out = Dense(self.num_action_space, activation='linear')(x)
    model = Model(inputs=[i1, i2], outputs=out)
    model.compile(loss='mean_squared_error', optimizer=Adam(learning_rate=self.lr))
    return model
def initialize_model(self):
    conv_layers = self.conv_layers[:]
    first_conv_layer = conv_layers.pop(0)
    i1 = Input(shape=self.combined_observation_space[0])
    i2 = Input(shape=self.combined_observation_space[1])
    x = Conv2D(first_conv_layer, 8, 4, padding='same', activation='relu')(i1)
    for conv_layer in conv_layers:
        x = Conv2D(conv_layer, 3, 4, padding='same', activation='relu')(x)
    x = Flatten()(x)
    x = Concatenate(axis=1)([x, i2])
    layer = self.fc_layers[:]
    first_layer = layer.pop(0)
    x = Dense(first_layer, activation='relu')(x)
    for layer in layer:
        x = Dense(layer, activation='relu')(x)
    out = Dense(self.num_action_space, activation='linear')(x)
    model = Model(inputs=[i1, i2], outputs=out)
    model.compile(loss='mean_squared_error', optimizer=Adam(learning_rate=self.lr))
    return model