I would like to manually define connections in neural network between layers using TensorFlow and keras with Python. By default connections are beween all pairs of neurons. I need to make connections as in picture below.
1 Answer
$\begingroup$
$\endgroup$
If I understand you correctly, to join two output layers into the next layer input, use the following design:
out1 = keras.layers.YourLayer1(**params**)
out2 = keras.layers.YourLayer2(**params**)
NextLayer = keras.layers.YourLayer3(**params**)[out1, out2]