I want to build a reinforcement learning model with keras which needs to have two outputs. can it be done the same way that the Keras library does or is it even doable?
this is what I want to do
inp = Input(shape=(input_layer_size, ))
x = Dense(hidden_layer_size, activation="relu")(inp)
for i in range(nb_hidden_layer):
x = Dense(hidden_layer_size, activation="relu")(x)
a1 = Dense(1, activation='sigmoid')(x)
a2 = Dense(1, activation='sigmoid')(x)
CodePudding user response:
yes, it is possible, just use:
model = Model(inp, [a1,a2])
and pay attention to the order of your outputs to don't mistaken them.