码迷,mamicode.com
首页 > 其他好文 > 详细

cs231n-3

时间:2017-03-11 21:30:39      阅读:169      评论:0      收藏:0      [点我收藏+]

标签:import   die   hit   having   this   max   always   row   stand   

b is called the bias vector because it influences the output scores, but without interacting with the actual data.

 

Interpretation of linear classifiers as template matching. Another interpretation for the weights WW is that each row of WW corresponds to a template (or sometimes also called a prototype) for one of the classes.
The score of each class for an image is then obtained by comparing each template with the image using an inner product (or dot product) one by one to find the one that “fits” best. With this terminology, the linear classifier is doing template matching,
where the templates are learned. Another way to think of it is that we are still effectively doing Nearest Neighbor, but instead of having thousands of training images we are only using a single image per class (although we will learn it,
and it does not necessarily have to be one of the images in the training set), and
we use the (negative) inner product as the distance instead of the L1 or L2 distance.

Image data preprocessing. As a quick note, in the examples above we used the raw pixel values (which range from [0…255]). In Machine Learning, it is a very common practice to always perform normalization of your input features (in the case of images, every pixel is thought of as a feature). In particular, it is important to center your data by subtracting the mean from every feature. In the case of images, this corresponds to computing a mean image across the training images and subtracting it from every image to get images where the pixels range from approximately [-127 … 127]. Further common preprocessing is to scale each input feature so that its values range from [-1, 1]. Of these, zero mean centering is arguably more important but we will have to wait for its justification until we understand the dynamics of gradient descent.

 

cs231n-3

标签:import   die   hit   having   this   max   always   row   stand   

原文地址:http://www.cnblogs.com/kprac/p/6536083.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!