Winter1516 Lecture51
Winter1516 Lecture51
Fei-Fei Li & Andrej Karpathy & Justin Johnson Lecture 5 - 1 20 Jan 2016
Administrative
A1 is due today (midnight)
I’m holding make up office hours on today: 5pm @ Gates 259
Also:
- We are shuffling the course schedule around a bit
- the grading scheme is subject to few % changes
Fei-Fei Li & Andrej Karpathy & Justin Johnson Lecture 5 - 2 20 Jan 2016
Things you should know for your Project Proposal
Fei-Fei Li & Andrej Karpathy & Justin Johnson Lecture 5 - 3 20 Jan 2016
Things you should know for your Project Proposal
Fei-Fei Li & Andrej Karpathy & Justin Johnson Lecture 5 - 4 20 Jan 2016
1. Train on ImageNet 2. Finetune network on
your own data
Fei-Fei Li & Andrej Karpathy & Justin Johnson Lecture 5 - 5 20 Jan 2016
Transfer Learning with CNNs
1. Train on 2. If small dataset: fix 3. If you have medium sized
ImageNet all weights (treat CNN dataset, “finetune” instead:
as fixed feature use the old weights as
extractor), retrain only initialization, train the full
the classifier network or only some of the
higher layers
i.e. swap the Softmax
layer at the end retrain bigger portion of the
network, or even all of it.
Fei-Fei Li & Andrej Karpathy & Justin Johnson Lecture 5 - 6 20 Jan 2016
E.g. Caffe Model Zoo: Lots of pretrained ConvNets
https://github.com/BVLC/caffe/wiki/Model-Zoo
...
Fei-Fei Li & Andrej Karpathy & Justin Johnson Lecture 5 - 7 20 Jan 2016
Things you should know for your Project Proposal
Fei-Fei Li & Andrej Karpathy & Justin Johnson Lecture 5 - 8 20 Jan 2016
Things you should know for your Project Proposal
Mini-batch SGD
Loop:
1. Sample a batch of data
2. Forward prop it through the graph, get loss
3. Backprop to calculate the gradients
4. Update the parameters using the gradient
Fei-Fei Li & Andrej Karpathy & Justin Johnson Lecture 5 - 10 20 Jan 2016
Where we are now...
(image credits
to Alec Radford)
Fei-Fei Li & Andrej Karpathy & Justin Johnson Lecture 5 - 11 20 Jan 2016
Neural Turing Machine
input tape
loss
Fei-Fei Li & Andrej Karpathy & Justin Johnson Lecture 5 - 12 20 Jan 2016
activations
“local gradient”
gradients
Fei-Fei Li & Andrej Karpathy & Justin Johnson Lecture 5 - 13 20 Jan 2016
Implementation: forward/backward API
Graph (or Net) object. (Rough psuedo code)
Fei-Fei Li & Andrej Karpathy & Justin Johnson Lecture 5 - 14 20 Jan 2016
Implementation: forward/backward API
x
z
*
y
Fei-Fei Li & Andrej Karpathy & Justin Johnson Lecture 5 - 15 20 Jan 2016
Example: Torch Layers
Fei-Fei Li & Andrej Karpathy & Justin Johnson Lecture 5 - 16 20 Jan 2016
Neural Network: without the brain stuff
Fei-Fei Li & Andrej Karpathy & Justin Johnson Lecture 5 - 17 20 Jan 2016
Fei-Fei Li & Andrej Karpathy & Justin Johnson Lecture 5 - 18 20 Jan 2016
Neural Networks: Architectures
Fei-Fei Li & Andrej Karpathy & Justin Johnson Lecture 5 - 19 20 Jan 2016
Training Neural Networks
A bit of history...
Fei-Fei Li & Andrej Karpathy & Justin Johnson Lecture 5 - 20 20 Jan 2016