Deep learning so far this week
Deep learning for different problemsvision tasks
Motivation
Data-driven approach:
- Collect a dataset of images and labels
- Use machine learning to train an image calssifier
- Evaluate the classifier on a withheld set of test images
Feature Learning
What is feature learning? [^what is feature learning]
Deep learning
Supervised learning
Linear regression
Neural network
Neural networks with many layers
Gradient Descenthow to find the best weights\ (w^t\)
Which is down hill?
Gradient Descent
Fancier rules:
- Momentum
- Nag
- Adagrad
- Adadelta
- Rmsprop
You can see it again later!
BackPropagation
A two-layer neural network in lines of code
ImportNumPy asNpd,h,n= 8, -, +#randomly Initialize WeightsW1=Np.random.randn (d,h) W2=NP.RANDOM.RANDN (H,D) forTinch xrange(10000): X=Np.random.randn (n,d) y=Np.sin (x) s=X.dot (W1) A=Np.maxium (s),0) Y_hat=A.dot (W2) loss= 0.5*Np.sum((Y_hat-Y**2.0) Dy_hat=Y_hat-Y dW2=A.t.dot (W2. T) da=Dy_hat.dot (W2. T) DS=(s> 0)*Da dW1=X.t.dot (DS) W1-=Learning_rate*DW1 W2-=Learning_rate*DW2
[^what is feature learning]:
In machine learning, feature learning or representation Learningis a set of techniques that learn a feature:a Transformat Ion of raw data input to a representation the can is effectively exploited in machine learning tasks. This obviates manual feature engineering, which are otherwise necessary, and allows a machine-to-both learn at a specific T Ask (using the features) and learn the features themselves.
Feature learning is motivated by the fact this machine learning tasks such as classification often require input that is M Athematically and computationally convenient to process. However, real-world data such as images, video, and sensor measurement is usually complex, redundant, and highly variable. Thus, it is necessary to discover useful features or representations from raw data. Traditional hand-crafted features often require expensive human labor and often rely on expert knowledge. Also, they normally do not generalize well. This motivates the design of efficient feature learning techniques, to automate and generalize this.
Feature learning can is divided into the categories:supervised and unsupervised Feature learning, analogous to these Cate Gories in machine learning generally.
In supervised feature learning, features is learned with labeled input data. Examples include supervised neural Networks, multilayer Perceptron, and (supervised) dictionary learning.
In unsupervised feature learning, features is learned with unlabeled input data. Examples include dictionary learning, independent component analysis, autoencoders, and various forms of clustering.
[Learning Notes] CS131 Computer Vision:foundations and applications:lecture 9 deep learning 2