Issue 1:
Hi all,

I am writing as I have some fundamental confusion about the merge/concatenate layers. I have not found an answer to my question on stackoverflow or other site, so any help would be appreciated.

Context: I have built two sequential models. Both models are two different data types although they both lead to the same classifications on the other side. What I would like to do is merge layers between two models in order to share information and learn new features based on both models that are leading to classifications made.

My models are as follows: (please note they are the same for this post, however one will stay the same one will highly likely have another layer added on plus more neurons in each layer when more data becomes available:

**model1**
model= Sequential()
model.add(Dense(units=64, input_dim=5078, activation="relu"))
model.add(Dense(units=32, activation="relu"))
model.add(Dense(units=100, activation="relu"))
model.add(Dense(units=24, activation="sigmoid"))

**model2**
modelSC= Sequential()
modelSC.add(Dense(units=64, input_dim=5078, activation="relu"))
modelSC.add(Dense(units=32, activation="relu"))
modelSC.add(Dense(units=100, activation="relu"))
modelSC.add(Dense(units=24, activation="sigmoid"))

I would like the penultimate layers in each model to merge before the output: (Dense 100)

My first question: Both models are comprised of multiple layers: The keras documentations states the following for layer merging:

left_branch = Sequential()
left_branch= Sequential()
left_branch.add(Dense(units=64, input_dim=5078, activation="relu"))
left_branch.add(Dense(units=32, activation="relu"))
left_branch.add(Dense(units=100, activation="relu"))

right_branch = Sequential()
right_branch= Sequential()
right_branch.add(Dense(units=64, input_dim=5078, activation="relu"))
right_branch.add(Dense(units=32, activation="relu"))
right_branch.add(Dense(units=100, activation="relu"))

merged = Concatenate([left_branch, right_branch])

final_model.add(Dense(24, activation='sigmoid'))

final_model.compile(optimizer='adam', loss='binary_crossentropy')
final_model.fit([X_train, X_trainSC], trainingtarget1)

For the model.fit call. I don't understand how to implement from training and test data, each tensor that comes from the different models, and also the one-hot data is different in each one, number of samples etc. the model.fit doesn't appear to support adding all of these elements.

Can anybody offer any advice on how to resolve this/further clarify where I have made a mistake? The goal of what I am trying to do is to is to have 2 models (or more in the future with different data sources[that are not the same as each other]), for all the data to be shared at one layer in order to further inform the final classification.

Also, idf two models contain different amounts of layers each, is there a default by which keras defines which layers become merged? is is the last layer in right or left_branch.add?

Thank you for your time!

Issue 2:
I request that the global precision, recall and f1 metrics (for binary classification) be added to callbacks.py. It would be useful for users if they could see their model's precision, recall or f1 score on the validation data (after each epoch). Many times, these metrics are more useful than simple accuracy.

Thank you!

[y] Check that you are up-to-date with the master branch of Keras. You can update with:

pip install git+git://github.com/keras-team/keras.git --upgrade --no-deps

[y] Check that your version of TensorFlow is up-to-date. The installation instructions can be found here.

[] Provide a link to a GitHub Gist of a Python script that can reproduce your issue (or just copy the script here if it is short).