10.1: Introduction to Neural Networks - The Nature of Code
-
0:01 - 0:07Hello, welcome to a video that
at this present time doesn't exist, -
0:07 - 0:10but when you are watching this video,
-
0:10 - 0:13right there, to the right of 9: Genetic Algorithms
-
0:13 - 0:15will be the number 10,
-
0:15 - 0:17and it will say next to that, Neural Networks.
-
0:17 - 0:22So I am embarking on a journey
to learn about neural networks: -
0:22 - 0:25what they are, how you program them,
-
0:25 - 0:28what's the kind of math
and stuff you need to know -
0:28 - 0:31to make them work, and then what kinds of creative
-
0:31 - 0:34and experimental outcomes can you have.
-
0:34 - 0:39Now, it should be said that there are lots
-
0:39 - 0:41and lots of machine learning libraries out there.
-
0:41 - 0:46There are lots of examples
and resources for doing this. -
0:46 - 0:48I want to--
-
0:48 - 0:50Hold on, I'm still talking.
-
0:50 - 0:52I don't know where--
Where did I put that book? -
0:52 - 0:53Ah, it's over here.
-
0:53 - 0:55I want to reference this book,
-
0:55 - 0:58Make Your Own Neural Network by Tariq Rashid,
-
0:58 - 1:01which I used to develop a lot of the materials
-
1:01 - 1:03that I will be presenting to you
-
1:03 - 1:06and developing during this series of videos.
-
1:06 - 1:09And I should also say that, you know--
-
1:10 - 1:15And this book, this book has all sorts--
-
1:15 - 1:17has how to program your own neural network
-
1:17 - 1:18from scratch and without even knowing anything
-
1:18 - 1:20about programming in Python,
-
1:20 - 1:22because, as I might have said earlier today,
-
1:22 - 1:26any reasonable person would start
and make a video tutorial series -
1:26 - 1:29about programming a neural network
from scratch in Python, -
1:29 - 1:31but I don't really--
-
1:31 - 1:34I'm not very reasonable or logical,
-
1:34 - 1:37and I just constantly make mistakes with everything.
-
1:37 - 1:38And here's a mistake that I'm going to make.
-
1:38 - 1:40I'm going to do all this in JavaScript.
-
1:40 - 1:42And the reason for doing that
-
1:42 - 1:44is to have everything run in the browser,
-
1:44 - 1:48on the web, and also really for me
to learn about how to do this stuff. -
1:48 - 1:52So I am going to build a set--
-
1:52 - 1:56I'm going to build a simple
neural network library in JavaScript, -
1:56 - 1:59not to make something efficient,
not to make something robust, -
1:59 - 2:03but to learn about the mechanics
of how all this stuff works, -
2:03 - 2:06because, ultimately--
and you might want to -
2:06 - 2:10just enjoy your summer, or maybe
you're watching this during the winter, -
2:10 - 2:12and get outside and do something else
-
2:12 - 2:16and not watch these videos
and just skip ahead to later, -
2:16 - 2:18because I'm going to do a bunch
of coding challenges and projects -
2:18 - 2:24that involve that neural network library
and also other neural network libraries, -
2:24 - 2:27namely something called TensorFlow, in future videos.
-
2:27 - 2:31But these first videos of building
the neural network library, -
2:31 - 2:32which I will do over a series,
-
2:33 - 2:36really just for me to learn
how to do this stuff. -
2:36 - 2:38And if you want to watch and sort of
-
2:38 - 2:40give me some good feedback
and see if you can follow along -
2:40 - 2:42and improve on what I'm doing
-
2:42 - 2:44and help me with it,
that would be great. -
2:44 - 2:48So, okay, what-- what--
-
2:48 - 2:50Hello, am I just rambling here?
-
2:50 - 2:52I am. But why are we here?
-
2:52 - 2:54So I'm going to go--
-
2:54 - 2:57So the Nature of Code materials in this video
-
2:57 - 2:59sits in the Nature of Code playlist
-
2:59 - 3:03is all about looking at things in nature,
-
3:03 - 3:04in our physical world,
-
3:04 - 3:06and trying to unpack those things
-
3:06 - 3:09and understand the algorithms behind those things,
-
3:09 - 3:11and see if we can convert those things,
-
3:11 - 3:12those algorithms, into code--
-
3:12 - 3:15Ah, this is like going--
it's like autoplaying. (laughs) -
3:15 - 3:17How do I stop that?
-
3:18 - 3:23..and turning those things into software
to make animations and creative projects. -
3:25 - 3:31Why not look at something really
interesting in nature: the brain? -
3:31 - 3:35So this is kind of a loose diagram of this idea
-
3:35 - 3:38of an actual biological neural network.
-
3:38 - 3:40Apparently, I have one here--
-
3:40 - 3:43I'm struggling quite a bit these days--
-
3:43 - 3:46where there are these entities called neurons,
-
3:46 - 3:47and they're connected to other neurons.
-
3:47 - 3:51And there's a lot of, you know, mystery to this
-
3:51 - 3:54and a lot of recent research [inaudible] neuroscience.
-
3:54 - 3:58What I am focused on in this series of videos
-
3:58 - 4:02is what kinds of computational systems can be built,
-
4:02 - 4:06inspired by the actual biological neural network,
-
4:06 - 4:09biological brain, and made into something
-
4:09 - 4:13called an artificial neural network?
-
4:13 - 4:18And what kinds of applications
and outcomes can we create? -
4:18 - 4:20So what is the analog?
-
4:20 - 4:24What is the neuron in our code?
-
4:24 - 4:28How does it receive inputs?
How does it generate outputs? -
4:28 - 4:30So my brain does this.
-
4:30 - 4:33It receives all these inputs
from light in the room -
4:33 - 4:36that travel through my retina
and into the brain and the signals -
4:36 - 4:40then produce outputs that allow me
to catch something or read some words. -
4:41 - 4:45How can that process be simulated in software?
-
4:45 - 4:48And what types of outcomes can we generate?
-
4:48 - 4:51And the very first thing that I'm going to do
-
4:51 - 4:55is look at the simplest possible neural network,
-
4:55 - 4:57a net--
It's not even a network at all. -
4:57 - 5:00It has one neuron, a processor neuron,
-
5:00 - 5:03that receives two inputs and generates an output.
-
5:03 - 5:05And that's called a perceptron.
-
5:05 - 5:08So if you look at the next videos in this playlist,
-
5:08 - 5:10I am going to build, in Processing,
-
5:10 - 5:14a perceptron example just to show the mechanics
-
5:14 - 5:18of how this works and to produce some trivial example
-
5:18 - 5:20that doesn't necessarily have a very powerful outcome,
-
5:20 - 5:22but gives us--
Because if we can build -
5:22 - 5:25and understand how this single neuron
-
5:25 - 5:28receives inputs, processes those,
and generates an output, -
5:28 - 5:32then we can start to connect those together
-
5:32 - 5:34to create more sophisticated systems
-
5:34 - 5:38that can begin to generate outputs based on--
-
5:38 - 5:41more complex outputs based on more complex inputs.
-
5:41 - 5:42And this is kind of--
-
5:43 - 5:46sits right there in the world of machine learning,
-
5:46 - 5:51this idea of I have some data
that I want to make sense of. -
5:51 - 5:54That data is an input to a machine learning algorithm.
-
5:54 - 5:57That algorithm is going to generate an output.
-
5:57 - 5:58So maybe the data is an image.
-
5:58 - 6:01The machine learning algorithm
is going to guess is it a cat or a dog? -
6:01 - 6:04Or maybe that input is the specs of the house,
-
6:04 - 6:09you know, square footage, number of bedrooms,
-
6:09 - 6:11etc., etc., and this machine learning system
-
6:11 - 6:14is going to generate an output: a predicted price.
-
6:14 - 6:17So there are lots of other machine learning algorithms
-
6:17 - 6:19besides just neural network based ones,
-
6:19 - 6:23and I do have another videos series
that cover some of those, -
6:23 - 6:25but ultimately I want to learn
how a neural network works, -
6:25 - 6:29so I can place it right there
and start to make sense of data, -
6:29 - 6:31and generate outputs from it.
-
6:31 - 6:33So if you want to continue along,
-
6:33 - 6:35the way this video series will work,
-
6:35 - 6:39first there'll be a perceptron,
which is this thing. -
6:39 - 6:41Then I'm going to talk--
after the perceptron's done, -
6:41 - 6:43I'm going to talk about what the limitations
-
6:43 - 6:45of the perceptrons are and why it is
-
6:45 - 6:48that if we can create a multi-layered perceptron,
-
6:48 - 6:52meaning many of these perceptrons
all connected to each other, -
6:52 - 6:55what we can start to build
and create afterwards. -
6:55 - 6:58So that's my rambling introduction
-
6:58 - 7:00that apparently you just watched,
-
7:00 - 7:04because-- I mean, maybe
no one will ever watch this, -
7:04 - 7:06but probably somebody will.
-
7:06 - 7:09And I'll see you. Follow along.
-
7:09 - 7:12I look forward to your feedback.
I hope this goes okay. -
7:12 - 7:15That's a pretty good goal.
Just okay is fine. -
7:15 - 7:18And I'll see you in these
future videos as I keep going. -
7:18 - 7:19Thanks for watching.
-
7:19 - 7:22(upbeat music)
- Title:
- 10.1: Introduction to Neural Networks - The Nature of Code
- Description:
-
Welcome to Chapter 10 of The Nature of Code (http://natureofcode.com/): Neural Networks.
In this video, I provide a brief introduction neural networks and an overview of topics in upcoming videos.
Next video (Perceptron): https://youtu.be/ntKn5TPHHAk
This video is also part of session 4 of my Spring 2017 ITP "Intelligence and Learning" course (https://github.com/shiffman/NOC-S17-2-Intelligence-Learning/tree/master/week4-neural-networks)
Support this channel on Patreon: https://patreon.com/codingtrain
To buy Coding Train merchandise: https://codingtrain.storenvy.com
To donate to the Processing Foundation: https://processingfoundation.org/Send me your questions and coding challenges!: https://github.com/CodingTrain/Rainbow-Topics
Contact:
Twitter: https://twitter.com/shiffman
The Coding Train website: http://thecodingtrain.com/Links discussed in this video:
The Nature of Code: http://natureofcode.com/
Session 4 of Intelligence and Learning: https://github.com/shiffman/NOC-S17-2-Intelligence-Learning/tree/master/week4-neural-networks
Perceptron on Wikipedia: https://en.wikipedia.org/wiki/Perceptron
My Simple Artificial Neural Network JavaScript Library: https://github.com/shiffman/Neural-Network-p5Books discussed in this video:
Tariq Rashid's Make Your Own Neural Network: https://www.amazon.com/Make-Your-Own-Neural-Network-ebook/dp/B01EER4Z4G
Marvin Minsky's Perceptrons: https://www.amazon.com/Perceptrons-Introduction-Computational-Marvin-Minsky/dp/0262631113Source Code for the all Video Lessons: https://github.com/CodingTrain/Rainbow-Code
p5.js: https://p5js.org/
Processing: https://processing.orgThe Nature of Code playlist: https://www.youtube.com/user/shiffman/playlists?view_as=subscriber&shelf_id=6&view=50&sort=dd
For More Coding Challenges: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
For More Intelligence and Learning: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6YJ3XfHhT2Mm4Y5I99nrIKX - Video Language:
- English
- Duration:
- 07:32