0
点赞
收藏
分享

微信扫一扫

杀死那个名为360安全的软件

CNN(Convolutional Neural Network)

Import a question:classification

given a feature representing for images, how do we learn a model for distinguishing features from different classes?

The machine learning framework

1:prediction function to get desired output:
f(🍎)=apple
f(🍅)=tomato
f(🐮)=cow

2:The framework
请添加图片描述
here, there are two activities:

  • Training:knowing training set {(x1,y1)……(xn,yn)} estimate the prediction function f
  • Testing:knowing f,to test x and output value y=f(x)

Neural Networks(Linear)

  • Perceptron(感知机)
  • Linear classifier-vector of weights w and a ‘bias b
    请添加图片描述

An example of binary classifying an image

  • Each pixel of the image would be an input, so, for a 28x28 image, we vectorize(矢量化),x=1x784
  • w is a vector of weights for each pixel: 784x1
  • b is a scalar(标量) bias per perceptron
  • result=xw+b ->(1x784)(784x1)+b->(1x1)+b
    [Notice: the result of multiplying xw is a scalar(dot product)]

Multuclass(add more perceptrons)

请添加图片描述

  • x same as above example ->x=1x784
  • W is a matrix of weights for each pixel/each perceptron
    w=784x10(assume 10-class classification)
  • b is a bias per perceptron(vector of biases)->b=1x10
  • result=xW+b=(1x784)x(784x10)+b=(1x10)+(1x10)=output vector

Bias convenience

  • create a ‘fake’ feature with value 1 to represent the bias
  • Add an extra weight that can vary

请添加图片描述
Then: the composition :
请添加图片描述
Outputs from one perceptron are fed into inputs of another perceptron
请添加图片描述
It’s all just matrix multiplication!

Two problems

1:with all linear functions, the composition of functions is really just a single function(not complex function)

2:Linear classifiers:small change in input can cause large change in binary output=problem for composition of functions.

The thing we want:请添加图片描述

Neural Network(Non-Linearities)

MLP(Multi-layer perceptron)

举报

相关推荐

0 条评论