20
loading...
This website collects cookies to deliver better user experience
models.Sequential()
, so-called because this class adds each layer sequentially using a certain add()
method inside the returned model:(784,None)
, in order words, a vector of 784 elements, which is then passed to the first hidden layer that reduces the size to 32 elements, which is then passed to the second layer that further reduces the output size to 10 elements or dimensionality of (10,None)
. The last layer is technically the output layer.Model()
class and creating the layers from scratch, allowing you to create directed acrylic graphs of layers. The following code creates the same neural network model as the first one:mse
- the mean squared error - function to calculate the loss, and we instruct Keras to track the model's accuracy.