What it is
A feedforward neural network is a stack of layers of simple units. Each unit multiplies its inputs by weights, adds them up and passes the result through a simple function. Information flows one way, from input to output, with no loops.
What it is for
It learns a mapping from inputs to outputs when you have examples: predicting a price from a house's features, deciding whether an email is spam, recognising handwritten digits. It is also a building block inside bigger models, such as the feed-forward layers of a transformer.
How to do it
- Decide what goes in and what comes out (for example 784 pixel values in, 10 digit scores out).
- Choose the shape: how many layers and how many units per layer. Start small.
- Prepare examples as pairs of input and correct answer, and split them into a training set and a test set.
- Train the network (see Training and backpropagation) until the error on the test set stops improving.
- Use it: feed a new input through the layers and read the output.