Now we're going to talk about how to do machine learning using GPUs and then CUDA advance libraries. We're going to focusing on neural networks, which are built around the idea that these networks reflect how our brains work and they allow us to have computers respond to certain problems by recognizing patterns. This is very commonly used in AI machine learning, deep learning. They've been around for a while. There are some variations, all things are similar. They use slightly different mathematical operations or slightly different representations. They even use four things such as processing human language, looking at images and video, and recognizing objects, collision detection in autonomous vehicles. They are not really well-built to run on CPUs because CPU's handle very big problems on one or multiple cores, but not many. Whereas neural networks need to calculate lots of small computations and do them constantly and the GPU is a much better tool for that. What constitutes a neural network? Well, they always have to have one or more inputs and outputs, and those are nodes. Think of this as a graph that's laid up from left to right, where on the left side there are inputs. There can be one or more. You can think of it as if you have pixels. Each pixel is a specific input to a neural net. Then the outputs are generally something like what the confidence that a specific pixel or this image in general is part of, say, there in there there's an object like someone who's walking out between cars in an autonomous vehicle use case. The inputs and outputs are layers. They're layers in between. What layers are is a collection of nodes that get fired at the same time, so it's a sequence from left to right. Sometimes layers are individual nodes that are hidden. That means we don't expressly say what the computation that it will be doing is it can change over time where we get to that idea of deep learning. Nodes can have inputs and outputs that are binary, either true or false, one or zero. They can be continuous. Think of a number between zero and 100, 0, 1, 2, 3, 4. Take me categorical binned. Often if you're trying to identify a type of object and image that's a categorical output that has a value associated with it. You can use print to any computation you think of. But they run better when they're simple. By better I mean faster. There can be some computations that need to be complex to yet a more knowledgeable output. Then the nodes are all connected as inputs and outputs to each other. Let's think about this here again, visually, like I described before. There's an input and output layer. This is what's shown in the top right, is a complex deep neural network that has multiple hidden layers. They're shown in green. You can see all the connections. Pretty much every node should connect to another node there that's not necessary. On the bottom left you see the simplest example of a neural net, which is a perceptron, which is given multiple inputs, it has one output. You could think of this as part of a more complex neural network, but it can stand on its own. Now, the more nodes and especially the more layers, the better the performance is from a qualitative perspective. But the more layers, the larger the model, it can be slower. You have to consider it and you don't also want to over tune or have way too many layers because you may be training your neural network to work on the training data and not more generally. How do we use GPS with neural networks? Well, think of each single-processor as a node in a neural network. Now, they can output here zero or one continuous value based on inputs are given. They need to run in successive layers, so maybe blocks that output values into a stream, or they're synchronized and other ways such that specific layers only fire after the previous layer has completed. The simpler the calculations, the better, and they should be independent of each other. They should be given an input and generate an output. That's pretty much on GPS and CUDA we've been learning about the whole time. The really nice thing is to connect all that up and to do a lot of the work for you. There is cuDNN.