Menu

Building the ANN Model

Building the ANN Model

Create the Artificial Neural Network.

Code

ann = keras.Sequential([
keras.layers.Flatten(input_shape=(32,32,3)),
keras.layers.Dense(3000, activation='relu'),
keras.layers.Dense(1000, activation='relu'),
keras.layers.Dense(10, activation='softmax')
])

Explanation

The ANN consists of:

  • Flatten Layer
  • Hidden Layer 1
  • Hidden Layer 2
  • Output Layer

The output layer has 10 neurons, one for each image category.