EXAMPLES. DEEP LEARNING IS ABOUT DATA. ▸ Machine learning lets see customize examples and features and models. ▸ Deep learning is about one model to rule them all. As long as you have data you can learn the parameters. But can you interpret?
is inspired by biology! (kind of) ▸ Brain has 86 billion neurons and 10^15 synapses. ▸ Each neuron receives input signals from dendrites and produces output signals along its axon, which connects to other dendrites. ▸ Neurons can fire and whether it fires is based on an activation threshold. ▸ Inhibitory and excitatory neurons!
of a biological neuron. If even… ▸ Like a neural cell, a neural unit takes inputs and makes outputs. ▸ The output a unit produces is based on an activation function. It represents the “frequency” of firing (probability). ▸ The input signals interact multiplicatively to represent inhibition and excitatory. These are weights!
▸ Inputs and outputs are easy to model. ▸ Sigmoid : maps real number to 0 and 1. Easy to see how this can help determine the activation function. ▸ Goes from not firing (0) to fully-saturated firing at maximum frequency (1). ▸ In real life, people use ReLu or Hyperbolic Tangent because it’s more stable.
think of a neural networks as layers allows us to build them fundamentally like lego blocks. ▸ As long as we ensure that each layer is designed well, we can just stack layers in any way we want! Super powerful. ▸ To change things, you can switch out layers, add, remove.
needs 3 things: ▸ A function to process input to output. ▸ A function to process derivative wrt output to derivative wrt input. ▸ A function to get gradients of parameters.
why do we need derivatives? ▸ The goal of machine learning in general is to find optimal parameters using some model. ▸ Think of a best fit line! The slope is out parameter. And we minimize distance of points to the line.
by gradient descent to find global maxima/minima. ▸ We can think of 3d data as topological map. There are valleys and mountains. To find optima, we want to take small steps in the right direction. ▸ A gradient/derivative represents the direction and size of the step! ▸ In real life, use Adagrad, Momentum, Newton’s CG.
Even if a complex model like a convolutional neural net, just do a forward pass to get outputs, then a backwards pass to get derivatives wrt to outputs, and use some of the layers to get derivatives wrt to parameters, and optimize.
filter over an image and creating a linear combination each time. ▸ Do this over an entire image and you get an image back. ▸ The parameters here are the filters themselves and the point of the model is to learn these filters.
If I do a lot of filters then after a convolution layer, I end up with a lot of images. ▸ To be more memory efficient, we can just take the largest one from a single filter.
N-dim vector. ▸ Like how vector calculations in python are faster than loops, everything in Torch is a tensor calculation. ▸ This is really useful for big data!
PYTHON. ▸ NN is a library that makes designing neural networks really really easy. You can define models, cost, and optimize with a few calls. ▸ It’s built with layers too. Like legos. INPUT OUTPUT LINEAR LINEAR NONLINEAR
A STEP. ▸ As great as deep learning is, there are big and noticeable drawbacks. What can we do? ▸ Combining with Bayesian Learning. ▸ Automating Hyperparameters. ▸ Biological Models? ▸ More industry applications.