CrashCourse · @crashcourse

Training Neural Networks: Crash Course AI #4

Uploaded June 7, 2020 · Length 12:29

Training Neural Networks: Crash Course AI #4

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.

  1. 0:00

    Hey, I’m Jabril and welcome to Crash Course AI!

  2. 0:03

    One way to make an artificial brain is by creating a neural network, which can have

  3. 0:08

    millions of neurons and billions (or trillions) of connections between them.

  4. 0:12

    Nowadays, some neural networks are fast and big enough to do some tasks even better than

  5. 0:17

    humans can, like for example playing chess or predicting the weather!

  6. 0:22

    But as we’ve talked about in Crash Course AI, neural networks don’t just work on their

  7. 0:26

    own.

  8. 0:27

    They need to learn to solve problems by making mistakes.

  9. 0:29

    Sounds kind of like us, right?

  10. 0:32

    INTRO

  11. 0:40

    Neural networks handle mistakes.

  12. 0:42

    using an algorithm called backpropagation to make sure all the neurons that contributed

  13. 0:47

    to an error get their math adjusted, and we’ll unpack this a bit later.

  14. 0:51

    And neural networks have two main parts: the architecture and the weights.

  15. 0:56

    The architecture includes neurons and their connections.

  16. 1:00

    And the weights are numbers that fine-tune how the neurons do their math to get an output.

  17. 1:03

    So if a neural network makes a mistake, this often means that the weights aren’t adjusted

  18. 1:08

    correctly and we need to update them so they make better predictions next time.

  19. 1:12

    The task of finding the best weights for a neural network architecture is called optimization.

  20. 1:17

    And the best way to understand some basic principles of optimization is with an example

  21. 1:22

    with the help of my pal John Green Bot.

  22. 1:30

    Say that I manage a swimming pool, and I want to predict how many people will come next

  23. 1:34

    week, so that I can schedule enough lifeguards.

  24. 1:37

    A simple way to do this is by graphing some data points, like the number of swimmers and

  25. 1:41

    the temperature in fahrenheit for every day over the past few weeks.

  26. 1:45

    Then, we can look for a pattern in that graph to make predictions.

  27. 1:48

    A way computers do this is with an optimization strategy called linear regression.

  28. 1:52

    We start by drawing a random straight line on the graph, which kind of fits the data

  29. 1:57

    points.

  30. 1:58

    To optimize though, we need to know how incorrect this guess is.