I would like to implement a neural network with an input layer, two dense hidden layer and a non-dense output layer. A toy example is shown in the figure below. The first hidden layer has three neurons, the second two and the final four neurons but between the second and third there are only four connections.
I would like to use Keras functional API. How can I implement it? Should I set the missing weight manually to 0? I would start as follows:
input=keras.layers.Input(...)
hidden1=keras.layers.Dense(3, activation="..")(input)
hidden2=keras.layers.Dense(3, activation="..")(hidden1)
but then I do not know how to proceed.
