Make a keras layer with two disconnected parts

Hello.
I’d like to make a neuronal network with the first two layers of sizes 2n and 2m respectively;
I want the first n neurones of the first layer to be densely connected with the m neurones of the second,
and the n last densely connected with the m last. It would look like two neuronal networks in parallel.

I found no core keras.layers working and I really don’t understand how does the custom layers work. What should I do ?

Hi @Belhouari_Sehane

Welcome to the TensorFlow Forum!

The given information is not much clear. Please refer to the Tensorflow doc for ‘Making new layers and models via subclassing’ to create custom layers as per your requirement. Thank you.