Codiqo

Understanding AI · lesson 31 of 60 · about 5 minutes

Deep Means Many Layers

Deep learning just means networks with lots of layers. See why depth makes them so powerful.

What you'll learn

  • Explain what makes a network deep
  • Count the weights in a small network
  • Explain why deeper networks need more data and computing power

Deep = many layers

The deep in deep learning simply means many hidden layers: tens or even hundreds. Each layer builds on the one before, so the network can learn very complicated patterns from simple pieces.

Lots of weights

Every connection between neurons has a weight. If one layer has 4 neurons and the next has 3, and every neuron connects to every neuron in the next layer, that's 4 x 3 = 12 weights. Big networks have millions or billions, which is why they need so much data and computing power to train.

Counting the connections in a small network with layers of 4, 3 and 2 neurons.

layers = [4, 3, 2]
weights = 0
for i in range(len(layers) - 1):
    weights = weights + layers[i] * layers[i + 1]
print(weights)

Output

18

Tip

4 x 3 is 12, then 3 x 2 is 6: 18 weights between the layers.

Now try it yourself

This lesson is free in Codiqo, with 6 questions on what you just read. You can only learn to code by writing code, so it ends with a short program you write yourself, which we run and check straight away.