The Keras functional API defines each layer as a function and provides operators to compose these functions into a larger computational graph. A function is some sort of transformation with a single input and single output. For example, the function y = f(x) defines a function f with input x and output y. Let us consider the simple sequential model from Keras (for more information refer to: https://keras.io/getting-started/sequential-model-guide/):
from keras.models import Sequential
from keras.layers.core import dense, Activation
model = Sequential([
dense(32, input_dim=784),
Activation("sigmoid"),
dense(10),
Activation("softmax"),
])
model.compile(loss="categorical_crossentropy", optimizer="adam")
As you can see, the sequential model represents the network as a linear pipeline, or list, of layers. We can also represent the network as the composition...