0%

But what is a neural network?

如果我要你写一个program 接受一个image with 很多像素值 然后要你output 一个具体的number 代表这个image represent的数字

How?
What we’re going to do is put together a neural network that can learn to recognize handwritten digits.

简单假设neuron:

Activation

this 784 neurons make up our first layer:

而最后一层的:

中间的是隐藏层
The way the network operates, activations in one layer determine the activations of the next layer.

how those activations from one layer bring about activations in the next layer It’s meant to be loosely analogous to how in biological networks of neurons, some groups of neurons firing cause certain others to fire.

if you feed in an image, lighting up all 784 neurons of the input layer according to the brightness of each pixel in the image, that pattern of activations causes some very specific pattern in the next layer which causes some pattern in the one after it,which finally gives some pattern in the output layer.And the brightest neuron of that output layer is the network’s choice

why it’s even reasonable to expect a layered structure like this to behave intelligently

Well, when you or I recognize digits, we piece together various components. A 9 has a loop up top and a line on the right. An 8 also has a loop up top, but it’s paired with another loop down low. A 4 basically breaks down into three specific lines, and things like that.

Now in a perfect world, we might hope that each neuron in the second to last layer corresponds with one of these subcomponents
like:

That way, going from the third layer to the last one just requires learning which combination of subcomponents corresponds to which digits.

Recognizing a loop can also break down into subproblems.

recognize the various little edges that make it up.

So our final hope is like:

design

let’s say the hope is for one particular neuron in the second layer to pick up whether or not the image has an edge in this region here. The question at hand is what parameters should the network have?

what we’ll do is assign a weight to each one of the connections between our neuron and the neurons from the first layer. Then take all of those activations from the first layer and compute their weighted sum according to these weights.

sigmoid

When you compute a weighted sum like this, you might come out with any number, but for this network what we want is for activations to be some value between 0 and 1.

bias

bias What we’ll do then is just add in some other number like negative 10 to this

So the weights tell you what pixel pattern this neuron in the second is picking up on, and the bias tells you how high the weighted sum needs to be before the neuron starts getting meaningfully active.

Every other neuron in this layer is going to be connected to all 784 pixel neurons from the first layer, and each one of those 784 connections has its own weight associated with it. Also, each one has some bias, some other number that you add

13,000 个旋钮和旋钮,可调整和转动to make this network behave in different ways.

So when we talk about learning, what that’s referring to is getting the computer to find a valid setting for all of these many many numbers so that it’ll actually solve the problem at hand.

so it’s actually more accurate to think of each neuron as a function, one that takes in the outputs of all the neurons in the previous layer and spits out a number between 0,1

784 numbers as an input and spits out 10 numbers as an output. It’s an absurdly complicated function, one that involves 13,000 parameters