CrashCourse · @crashcourse
Training Neural Networks: Crash Course AI #4
Uploaded June 7, 2020 · Length 12:29
Summary
Learn how neural networks train using backpropagation and optimization to adjust weights and minimize errors, illustrated with a pool attendance prediction example.
- neural network training
- backpropagation explained
- optimization algorithm
- weights and architecture
- linear regression example
- loss function
Transcript preview
The first 2 minutes of the transcript. Select a timestamp to watch that moment on YouTube.
- 0:00
Hey, I’m Jabril and welcome to Crash Course AI!
- 0:03
One way to make an artificial brain is by creating a neural network, which can have
- 0:08
millions of neurons and billions (or trillions) of connections between them.
- 0:12
Nowadays, some neural networks are fast and big enough to do some tasks even better than
- 0:17
humans can, like for example playing chess or predicting the weather!
- 0:22
But as we’ve talked about in Crash Course AI, neural networks don’t just work on their
- 0:26
own.
- 0:27
They need to learn to solve problems by making mistakes.
- 0:29
Sounds kind of like us, right?
- 0:32
INTRO
- 0:40
Neural networks handle mistakes.
- 0:42
using an algorithm called backpropagation to make sure all the neurons that contributed
- 0:47
to an error get their math adjusted, and we’ll unpack this a bit later.
- 0:51
And neural networks have two main parts: the architecture and the weights.
- 0:56
The architecture includes neurons and their connections.
- 1:00
And the weights are numbers that fine-tune how the neurons do their math to get an output.
- 1:03
So if a neural network makes a mistake, this often means that the weights aren’t adjusted
- 1:08
correctly and we need to update them so they make better predictions next time.
- 1:12
The task of finding the best weights for a neural network architecture is called optimization.
- 1:17
And the best way to understand some basic principles of optimization is with an example
- 1:22
with the help of my pal John Green Bot.
- 1:30
Say that I manage a swimming pool, and I want to predict how many people will come next
- 1:34
week, so that I can schedule enough lifeguards.
- 1:37
A simple way to do this is by graphing some data points, like the number of swimmers and
- 1:41
the temperature in fahrenheit for every day over the past few weeks.
- 1:45
Then, we can look for a pattern in that graph to make predictions.
- 1:48
A way computers do this is with an optimization strategy called linear regression.
- 1:52
We start by drawing a random straight line on the graph, which kind of fits the data
- 1:57
points.
- 1:58
To optimize though, we need to know how incorrect this guess is.


