Deep CNNs
Stanford University
06-Dec-2018
1
Lecture:DeepConvolutionalNeuralNetworks
ShubhangDesaiStanfordVisionandLearningLab
Deep CNNs
Stanford University
06-Dec-2018
2
Today’sagenda
• Deepconvolutionalnetworks• HistoryofCNNs• CNNdev• Architecturesearch
Deep CNNs
Stanford University
06-Dec-2018
3
Previously…
InputImage Prediction𝑦" Classifier
𝑎𝑟𝑔𝑚𝑎𝑥 𝑐)*+,
ClassificationOutput
InputLabel
𝑦 𝐶𝐸 𝐿LossValueLossFunction
FeatureExtractor
Deep CNNs
Stanford University
06-Dec-2018
4
Previously…
InputImage Prediction𝑦" Classifier
𝑎𝑟𝑔𝑚𝑎𝑥 𝑐)*+,
ClassificationOutput
InputLabel
𝑦 𝐶𝐸 𝐿LossValueLossFunction
FeatureExtractor
Deep CNNs
Stanford University
06-Dec-2018
5
Previously…
InputImage Prediction𝑦" Classifier
𝑎𝑟𝑔𝑚𝑎𝑥 𝑐)*+,
ClassificationOutput
InputLabel
𝑦 𝐶𝐸 𝐿LossValueLossFunction
FeatureExtractor
Deep CNNs
Stanford University
06-Dec-2018
6
Previously…
InputImage Prediction𝑦" Classifier
𝑎𝑟𝑔𝑚𝑎𝑥 𝑐)*+,
ClassificationOutput
InputLabel
𝑦 𝐶𝐸 𝐿LossValueLossFunction
FeatureExtractor
3)Usinggradientdescent!
Deep CNNs
Stanford University
06-Dec-2018
7
Previously…
InputImage Prediction𝑦" Classifier
𝑎𝑟𝑔𝑚𝑎𝑥 𝑐)*+,
ClassificationOutput
InputLabel
𝑦 𝐶𝐸 𝐿LossValueLossFunction
FeatureExtractor
3)Usinggradientdescent!
Whyonlyoneconvolution?
Deep CNNs
Stanford University
06-Dec-2018
8
Convolutions
Convolutions=Insights
MoreConvolutions=MoreInsights?
Deep CNNs
Stanford University
06-Dec-2018
10
RecallHubelandWeisel…
Thethinghasedges…
Theedgescanbegroupedintotrianglesandovals…
Thetrianglesareears,theovalisabody…
It’samousetoy!
Deep CNNs
Stanford University
06-Dec-2018
11
RecallHubelandWeisel…
Thethinghasedges…
Theedgescanbegroupedintotrianglesandovals…
Thetrianglesareears,theovalisabody…
It’samousetoy!
Deep CNNs
Stanford University
06-Dec-2018
12
ConvolutionsAcrossChannels
28×28×3 Image 15×15×3 Filter 14×14×1 Output
Deep CNNs
Stanford University
06-Dec-2018
13
ConvolutionsAcrossChannels
28×28×3 Image 15×15×3×4 Filter 14×14×4 Output
Deep CNNs
Stanford University
06-Dec-2018
14
ConvolutionsAcrossChannels
28×28×3 Image 15×15×3×4 Filter 14×14×4 Output
moreoutputchannels=morefilters
=morefeatureswecanlearn!
Deep CNNs
Stanford University
06-Dec-2018
16
StackingConvolutions
32×32×3Input
28×28×4Output
14×14×6Output
7×7×8Output
1×1×10Output
5×5×3×4ConvBlock
15×15×4×6ConvBlock
8×8×6×8ConvBlock
7×7×8×10ConvBlock
Deep CNNs
Stanford University
06-Dec-2018
17
StackingConvolutions
32×32×3Input
28×28×4Output
14×14×6Output
7×7×8Output
1×1×10Output
5×5×3×4ConvBlock
15×15×4×6ConvBlock
8×8×6×8ConvBlock
7×7×8×10ConvBlock
Deep CNNs
Stanford University
06-Dec-2018
18
ConvolutionalNeuralNetworks(ConvNets)
• Neuralnetworkswhichinvolvethestackingofmultipleconvolutionallayerstoproduceoutput
• Oftentimesendinfully-connectedlayersasthe“classifier”
Deep CNNs
Stanford University
06-Dec-2018
27
WhyDoTheyWorkSoWell?
Thisistheneuralnetwork’s“receptivefield”—it’sable
tosee!
Deep CNNs
Stanford University
06-Dec-2018
28
GreatApplicationsofConvNets
Fine-Grained Recognition Segmentation
ArtGeneration FacialRecognition
“StaffordshireBullTerrier”
“RanjayKrishna”
Deep CNNs
Stanford University
06-Dec-2018
29
WhatisCNNDev?
• Definetheobjective–Whatistheinput/output?–Whatistheloss/objectivefunction?
• Createthearchitecture– Howmanyconvlayers?–Whatsizearetheconvolutions?– Howmanyfully-connectedlayers?
• Definehyperparameters–Whatisthelearningrate?
• Trainandevaluate– Howdidwedo?– Howcanwedobetter?
Deep CNNs
Stanford University
06-Dec-2018
30
WhatisCNNDev?
• Definetheobjective–Whatistheinput/output?–Whatistheloss/objectivefunction?
• Createthearchitecture– Howmanyconvlayers?–Whatsizearetheconvolutions?– Howmanyfully-connectedlayers?
• Definehyperparameters–Whatisthelearningrate?
• Trainandevaluate– Howdidwedo?– Howcanwedobetter?
Canthisbeautomated?
Deep CNNs
Stanford University
06-Dec-2018
31
NeuralArchitectureSearch
Automaticallyfindsthebestarchitectureforagiventask
Beforewehadtofindbestfeaturizer forafixedclassifier—nowwefindthebestclassifierandfeaturizer intandem!
Deep CNNs
Stanford University
06-Dec-2018
32
Insummary…
Wecanuseconvolutionsasabasistobuildpowerfulvisualsystems
Wecanleveragedeeplearningtoautomaticallylearnthebestwaystodopreviouslydifficulttasksincomputervision
Stilllotsofopenquestions!
Ifyou’reinterestedinmachinelearningand/ordeeplearning,take:• MachineLearning(CS229)• DeepLearning(CS230)• NLPwithDeepLearning(CS224n)• ConvolutionalNeuralNetworks(CS231n)