liveBook · Manning

Input layer

As explained in Grokking Machine Learning

The neural-network layer that receives the input features or input representation.

The input layer is the first layer in a neural network and receives its input features or representation. Its size is the number of non-bias nodes; hidden layers follow it, with the output layer at the end. section 10.1

Setting an input shape

For a dataset with two features, a Keras dense layer can declare `input_shape=(2,)`. For handwritten digits, images are flattened into 784 values before the input shape is set to `(28*28,)`. section 10.3

Figure 10.21 The architecture that we will use to classify our dataset. It contains two hidden layers: one of 128 and one of 64 nodes. The activation function between them is a ReLU, and the final activation function is a softmax.

The diagram shows a two-node input layer followed by two hidden layers and a two-node output layer. section 10.3

How Grokking Machine Learning covers it

How deep it goes
Defines its position and layer size, then demonstrates declaring input shapes in Keras.
Examples
Uses two-feature data and flattened handwritten-digit images as input representations.
What you can do after
Apply it via Keras by setting `input_shape` to match the dataset's feature representation.
How it connects
Connects the input layer to hidden layers, the output layer, and fully connected neural-network architecture.

Also explained in

Compare how 4 books explain input layer →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Grokking Machine Learning. The section links point to the parts of the book it draws on.