Skip to content
MLG 009 Deep Learning episode artwork

Mar 4, 2017 51 min

MLG 009 Deep Learning

from Machine Learning Guide

Deep learning stacks simple units into artificial neural networks that learn which feature combinations matter and break data into a hierarchy. Also covers neurons, the multilayer perceptron, backpropagation, when not to use deep learning, and CNNs, RNNs and DQNs. Links Notes and resources at ocdevel.com/mlg/9 Join the free MLG group: listen to my other AI shows, ask me questions, and talk with other listeners Deep learning vs shallow learning Deep learning stacks simple learning units into layers. Shallow learning is every algorithm that doesn't, like linear and logistic regression. In practice, deep learning means artificial neural networks (ANNs). Neural networks have taken over most of AI, including image recognition with convolutional neural networks (CNNs, MLG 025) and language with transformers (MLG 033). What is a neuron in a neural network? A unit that takes inputs and computes one output. Here, each neuron is a logistic regression unit (MLG 007). Warren McCulloch, a neurophysiologist, and Walter Pitts proposed the artificial neuron in 1943 as a mathematical model of a biological one. Frank Rosenblatt's perceptron (1958) built on it, with a step function where logistic regression has a sigmoid. Multilayer perceptron architecture The basic neural network, also called a feedforward network. Each row of data flows left to right: input layer (one feature per unit) → hidden layer (neurons, called activation functions) → output layer (the hypothesis function) Every unit feeds every neuron in the next layer. Deep means many layers; wide means many neurons per layer. Feature learning: the medical cost example Predicting someone's yearly medical costs from age, smoking and obesity rules out linear regression. Cost grows with age more like age squared, and smoking plus obesity costs more than the two apart. You could hand-build features like age² and smoking × obesity, but usually you don't know which combinations matter. The hidden layer learns them. The output neuron is linear regression to predict a cost, or logistic regression to classify. Hierarchical representation: the face recognition example A 5×5 grayscale image flattens into a row of 25 pixel features. With two hidden layers, each combines the last layer's features into bigger ones: pixels → lines, edges and contours → eyes, ears, nose and mouth → face or not The network finds these parts itself. How neural networks learn: backpropagation Feedforward pass: predict. Loss: how far off the prediction was. Cross entropy for a classifier, mean squared error for a regression like medical costs. Backpropagation: carry the error backward through every layer to get each θ parameter's gradient, then update each θ with gradient descent (MLG 005). Gradient descent is one optimizer. Others, like AdaGrad and Adam, apply those gradients differently (MLG 028). When not to use deep learning When the problem is linear or doesn't need feature combinations. Deep learning trains on rented cloud GPUs, while shallow algorithms like naive Bayes, decision trees, support vector machines, k-nearest neighbors and k-means run on a laptop (MLG 012 and MLG 013). Neural network types and activation functions Multilayer perceptron: the basic network taught here. Convolutional neural network: images. Recurrent neural network: sequences such as time series, and text before transformers. Its neurons feed back into themselves (MLG 022). Deep Q-network (DQN): planning (MLG 029). Hidden layers most often use ReLU (rectified linear unit) or a variant such as GELU. The output layer uses sigmoid, softmax or linear regression. MLG 027 covers choosing activation functions. Deep learning resources 3Blue1Brown's Neural networks videos, a short visual introduction. Andrew Ng's Machine Learning Specialization on Coursera. Its second course, Advanced Learning Algorithms, builds neural networks in TensorFlow. Deep Learning by Ian Goodfellow, Yoshua Bengio and Aaron Courville, a free online textbook. Start it after Ng's course. More in the resources. Next: MLG 010, on languages and frameworks.

Episode details come from the podcast's RSS feed.

Embed this episode

Ready to play

MLG 009 Deep Learning

0:00 51:19

No transcript yet.

Requests help us decide what to transcribe next.

Frequently asked questions

How long is this episode of Machine Learning Guide?

This episode is 51 minutes long.

When was this Machine Learning Guide episode published?

This episode was published on March 4, 2017.

Can I download this Machine Learning Guide episode?

Yes. Use the download control on the episode player to save the publisher-provided media file.