Suppose that I created this model using Keras:
model = Sequential()
model.add(Dense(32, activation='tanh', input_dim=1))
model.add(Dense(10, activation='tanh'))
model.add(Dense(1, activation='linear'))
The input and output dimensions of this model are both 1. Now, suppose I want to add one more layer, which is the sum of the first derivative and second derivative (with respect to the input) of the model above, and use it as my new output layer. Is that possible in Keras? I did quite a lot of Googling but couldn't find anything.