We will create a Sequential network with four layers.
- Layer 1 is a dense layer which has input_shape of (*, 784) and an output_shape of (*, 32)
A dense layer is a regular densely-connected neural network layer. A Dense layer implements the operation output = activation(dot(input, kernel) + bias), where activation is the element-wise activation function passed as the activation argument, kernel is a weights matrix created by the layer, and bias is a bias vector created by the layer. (This is only applicable if use_bias is True).
- Layer 2 is an activation layer with the tanh Activation function applies activation to the incoming tensor:
keras.layers.Activation(activation)
Activation can also be applied as a parameter ...