SlideShare a Scribd company logo
1 of 35
Download to read offline
Deep Learning
10.1 Inside DNNs
Dr. Konda Reddy Mopuri
kmopuri@iittp.ac.in
Dept. of CSE, IIT Tirupati
Dr. Konda Reddy Mopuri dlc-10.1/Inside DNNs 1
1 Understanding how the DNNs learn or what happens inside the deep
architecture is not simple
Dr. Konda Reddy Mopuri dlc-10.1/Inside DNNs 2
1 Understanding how the DNNs learn or what happens inside the deep
architecture is not simple
2 Not many tools can help us analyse these complex architectures
Dr. Konda Reddy Mopuri dlc-10.1/Inside DNNs 2
1 In case of CNNs, we can look at
the parameters (e.g. filters as images)
Dr. Konda Reddy Mopuri dlc-10.1/Inside DNNs 3
1 In case of CNNs, we can look at
the parameters (e.g. filters as images)
activation maps for the given input
Dr. Konda Reddy Mopuri dlc-10.1/Inside DNNs 3
1 In case of CNNs, we can look at
the parameters (e.g. filters as images)
activation maps for the given input
distribution of activations for a population of samples
Dr. Konda Reddy Mopuri dlc-10.1/Inside DNNs 3
1 In case of CNNs, we can look at
the parameters (e.g. filters as images)
activation maps for the given input
distribution of activations for a population of samples
derivative of selected activations wrt a given input
Dr. Konda Reddy Mopuri dlc-10.1/Inside DNNs 3
1 In case of CNNs, we can look at
the parameters (e.g. filters as images)
activation maps for the given input
distribution of activations for a population of samples
derivative of selected activations wrt a given input
synthesize samples that can cause maximal activations at selected
neurons
Dr. Konda Reddy Mopuri dlc-10.1/Inside DNNs 3
Visualize in case of simpler models
1 Visualize the weights via plotting
Dr. Konda Reddy Mopuri dlc-10.1/Inside DNNs 4
Visualize in case of simpler models
1 Visualize the weights via plotting
2 e.g. input for an MLP is 2D vector
Dr. Konda Reddy Mopuri dlc-10.1/Inside DNNs 4
Visualize in case of simpler models
1 Visualize the weights via plotting
2 e.g. input for an MLP is 2D vector
3 weights in the first hidden layer are lines, we can plot them
Dr. Konda Reddy Mopuri dlc-10.1/Inside DNNs 4
Visualize in case of simpler models
1 Visualize the weights via plotting
2 e.g. input for an MLP is 2D vector
3 weights in the first hidden layer are lines, we can plot them
4 observe these lines during the course of training
Dr. Konda Reddy Mopuri dlc-10.1/Inside DNNs 4
CNN filters
1 Similar visualization gets challenging on practical DNNs because of
the high dimensional inputs
Dr. Konda Reddy Mopuri dlc-10.1/Inside DNNs 5
CNN filters
1 Similar visualization gets challenging on practical DNNs because of
the high dimensional inputs
2 View the filters learned by CNNs as images
Dr. Konda Reddy Mopuri dlc-10.1/Inside DNNs 5
CNN filters
1 Similar visualization gets challenging on practical DNNs because of
the high dimensional inputs
2 View the filters learned by CNNs as images
3 Appropriate at the first layer (since the filters will have less number of
channels like actual images)
Dr. Konda Reddy Mopuri dlc-10.1/Inside DNNs 5
CNN filters
1 Similar visualization gets challenging on practical DNNs because of
the high dimensional inputs
2 View the filters learned by CNNs as images
3 Appropriate at the first layer (since the filters will have less number of
channels like actual images)
4 Later layers will have multiple channels and makes it difficult to
visualize
Dr. Konda Reddy Mopuri dlc-10.1/Inside DNNs 5
CNN Filters (LeNet and AlexNet)
Dr. Konda Reddy Mopuri dlc-10.1/Inside DNNs 6
Visualize feature maps
1 Since CNNs maintain the 2D structure, we can visualize the
feature/activation maps at any layer
Dr. Konda Reddy Mopuri dlc-10.1/Inside DNNs 7
Visualize feature maps
1 Since CNNs maintain the 2D structure, we can visualize the
feature/activation maps at any layer
2 Since there may be a large number of channels, we may have to pick
a subset of them
Dr. Konda Reddy Mopuri dlc-10.1/Inside DNNs 7
Visualize feature maps
1 Since CNNs maintain the 2D structure, we can visualize the
feature/activation maps at any layer
2 Since there may be a large number of channels, we may have to pick
a subset of them
3 Visualizing individual maps may not be very helpful
Dr. Konda Reddy Mopuri dlc-10.1/Inside DNNs 7
Visualize feature maps
Figure credits: Shivang Shrivastav
Dr. Konda Reddy Mopuri dlc-10.1/Inside DNNs 8
Visualize feature maps
1 Although it is quite hard to precisely identify the role each filter, one
may identify edge and some blob detectors.
2 As we go deeper in the network, the more difficult it gets to
understand the role of filters
Dr. Konda Reddy Mopuri dlc-10.1/Inside DNNs 9
Visualize feature maps
1 Allows in particular to find units with a clear semantic/concept
Ross Girshick et al. 2014
Dr. Konda Reddy Mopuri dlc-10.1/Inside DNNs 10
Analyze the model behavior in the neighborhood of an input
1 We may estimate the importance of a portion of input via occlusion
Dr. Konda Reddy Mopuri dlc-10.1/Inside DNNs 11
Occlusion sensitivity
Dr. Konda Reddy Mopuri dlc-10.1/Inside DNNs 12
Occlusion sensitivity
Dr. Konda Reddy Mopuri dlc-10.1/Inside DNNs 13
Saliency maps
1 Highlight the parts of input that are influential for the output
Dr. Konda Reddy Mopuri dlc-10.1/Inside DNNs 14
Saliency maps
1 Highlight the parts of input that are influential for the output
2 Compute the derivative of the output wrt the input over a trained
DNN model (Simonyan et al. 2013)
∇|xfc(x; w)
Dr. Konda Reddy Mopuri dlc-10.1/Inside DNNs 14
Saliency maps
1 Highlight the parts of input that are influential for the output
2 Compute the derivative of the output wrt the input over a trained
DNN model (Simonyan et al. 2013)
∇|xfc(x; w)
3 input.requires_grad_()
output = model(input)
grad_input, = torch.autograd.grad(output[0, c], input)
Dr. Konda Reddy Mopuri dlc-10.1/Inside DNNs 14
Gradient as saliency
Dr. Konda Reddy Mopuri dlc-10.1/Inside DNNs 15
Smooth Grad
1 (Pixel level) Gradient is noisy
Dr. Konda Reddy Mopuri dlc-10.1/Inside DNNs 16
Smooth Grad
1 (Pixel level) Gradient is noisy
2 We can smooth the gradient by taking the mean gradient over
(slightly) perturbed inputs (Smilkov et al. 2017)
˜
∇|xfy(x; w) =
1
N
N
X
n=1
∇|xfy(x + n; w)
where n ∼ N(0, σ2I)
Dr. Konda Reddy Mopuri dlc-10.1/Inside DNNs 16
Smooth Grad
Dr. Konda Reddy Mopuri dlc-10.1/Inside DNNs 17
Improvements to gradient based visualization
1 Deconvolution by Zeiler and Fergus
2 Guided Backpropagation by Springenberg et al. (2014)
3 Class Activation Maps ( Zhou et al. 2016)
4 Gradient-weighted Class Activation Mapping (Grad-CAM) by
Selvaraju et al. (2016)
5 ...
Dr. Konda Reddy Mopuri dlc-10.1/Inside DNNs 18
References
1 Ross Girshick, Jeff Donahue, Trevor Darrell, Jitendra Malik; Rich Feature Hierarchies for
Accurate Object Detection and Semantic Segmentation, Proceedings of the IEEE Conference on
Computer Vision and Pattern Recognition (CVPR), 2014, pp. 580-587
2 K. Simonyan, A. Vedaldi, and A. Zisserman. Deep inside convolutional networks: Visualising
image classification models and saliency maps. CoRR, abs/1312.6034, 2013
3 D Smilkov, N. Thorat, B. Kim, F. Viegas, and M. Wattenberg. Smoothgrad: removing noise by
adding noise. CoRR, abs/1706.03825, 2017.
4 M. D. Zeiler and R. Fergus. Visualizing and understanding convolutional networks. In European
Conference on Computer Vision (ECCV), 2014
5 J. Springenberg, A. Dosovitskiy, T. Brox, and M. Riedmiller. Striving for simplicity: The all
convolutional net. CoRR, abs/1412.6806, 2014
6 R. Selvaraju, M. Cogswell, A. Das, R. Vedantam, D. Parikh, and D. Batra. Grad-cam: Visual
explanations from deep networks via gradient-based localization. CoRR, abs/1610.02391, 2016
7 B. Zhou, A. Khosla, A. Lapedriza, A. Oliva, and A. Torralba. Learning Deep Features for
Discriminative Localization. CVPR’16 (arXiv:1512.04150, 2015).
Dr. Konda Reddy Mopuri dlc-10.1/Inside DNNs 19

More Related Content

Similar to dlc-10.1.pdf

Similarity of inference face matching on angle oriented
Similarity of inference face matching on angle orientedSimilarity of inference face matching on angle oriented
Similarity of inference face matching on angle orientedAlexander Decker
 
11.similarity of inference face matching on angle oriented
11.similarity of inference face matching on angle oriented11.similarity of inference face matching on angle oriented
11.similarity of inference face matching on angle orientedAlexander Decker
 
From Conventional Machine Learning to Deep Learning and Beyond.pptx
From Conventional Machine Learning to Deep Learning and Beyond.pptxFrom Conventional Machine Learning to Deep Learning and Beyond.pptx
From Conventional Machine Learning to Deep Learning and Beyond.pptxChun-Hao Chang
 
Transfer Learning and Domain Adaptation (DLAI D5L2 2017 UPC Deep Learning for...
Transfer Learning and Domain Adaptation (DLAI D5L2 2017 UPC Deep Learning for...Transfer Learning and Domain Adaptation (DLAI D5L2 2017 UPC Deep Learning for...
Transfer Learning and Domain Adaptation (DLAI D5L2 2017 UPC Deep Learning for...Universitat Politècnica de Catalunya
 
Learning spatiotemporal features with 3 d convolutional networks
Learning spatiotemporal features with 3 d convolutional networksLearning spatiotemporal features with 3 d convolutional networks
Learning spatiotemporal features with 3 d convolutional networksSungminYou
 
Semantic Concept Detection in Video Using Hybrid Model of CNN and SVM Classif...
Semantic Concept Detection in Video Using Hybrid Model of CNN and SVM Classif...Semantic Concept Detection in Video Using Hybrid Model of CNN and SVM Classif...
Semantic Concept Detection in Video Using Hybrid Model of CNN and SVM Classif...CSCJournals
 
Transfer Learning and Domain Adaptation - Ramon Morros - UPC Barcelona 2018
Transfer Learning and Domain Adaptation - Ramon Morros - UPC Barcelona 2018Transfer Learning and Domain Adaptation - Ramon Morros - UPC Barcelona 2018
Transfer Learning and Domain Adaptation - Ramon Morros - UPC Barcelona 2018Universitat Politècnica de Catalunya
 
Development of a Location Invariant Crack Detection and Localisation Model (L...
Development of a Location Invariant Crack Detection and Localisation Model (L...Development of a Location Invariant Crack Detection and Localisation Model (L...
Development of a Location Invariant Crack Detection and Localisation Model (L...CSCJournals
 
DeepVO - Towards Visual Odometry with Deep Learning
DeepVO - Towards Visual Odometry with Deep LearningDeepVO - Towards Visual Odometry with Deep Learning
DeepVO - Towards Visual Odometry with Deep LearningJacky Liu
 
Learning RGB-D Salient Object Detection using background enclosure, depth con...
Learning RGB-D Salient Object Detection using background enclosure, depth con...Learning RGB-D Salient Object Detection using background enclosure, depth con...
Learning RGB-D Salient Object Detection using background enclosure, depth con...Benyamin Moadab
 
Object Detection with Computer Vision
Object Detection with Computer VisionObject Detection with Computer Vision
Object Detection with Computer VisionIRJET Journal
 
Target Detection Using Multi Resolution Analysis for Camouflaged Images
Target Detection Using Multi Resolution Analysis for Camouflaged Images Target Detection Using Multi Resolution Analysis for Camouflaged Images
Target Detection Using Multi Resolution Analysis for Camouflaged Images ijcisjournal
 
Introduction to deep learning based voice activity detection
Introduction to deep learning based voice activity detectionIntroduction to deep learning based voice activity detection
Introduction to deep learning based voice activity detectionNAVER Engineering
 
Master's Thesis - Data Science - Presentation
Master's Thesis - Data Science - PresentationMaster's Thesis - Data Science - Presentation
Master's Thesis - Data Science - PresentationGiorgio Carbone
 
Dimensionality reduction and visualization techniques for high-dimensional ge...
Dimensionality reduction and visualization techniques for high-dimensional ge...Dimensionality reduction and visualization techniques for high-dimensional ge...
Dimensionality reduction and visualization techniques for high-dimensional ge...Dušan Ranđelović
 

Similar to dlc-10.1.pdf (20)

Similarity of inference face matching on angle oriented
Similarity of inference face matching on angle orientedSimilarity of inference face matching on angle oriented
Similarity of inference face matching on angle oriented
 
11.similarity of inference face matching on angle oriented
11.similarity of inference face matching on angle oriented11.similarity of inference face matching on angle oriented
11.similarity of inference face matching on angle oriented
 
From Conventional Machine Learning to Deep Learning and Beyond.pptx
From Conventional Machine Learning to Deep Learning and Beyond.pptxFrom Conventional Machine Learning to Deep Learning and Beyond.pptx
From Conventional Machine Learning to Deep Learning and Beyond.pptx
 
Transfer Learning and Domain Adaptation (DLAI D5L2 2017 UPC Deep Learning for...
Transfer Learning and Domain Adaptation (DLAI D5L2 2017 UPC Deep Learning for...Transfer Learning and Domain Adaptation (DLAI D5L2 2017 UPC Deep Learning for...
Transfer Learning and Domain Adaptation (DLAI D5L2 2017 UPC Deep Learning for...
 
Learning spatiotemporal features with 3 d convolutional networks
Learning spatiotemporal features with 3 d convolutional networksLearning spatiotemporal features with 3 d convolutional networks
Learning spatiotemporal features with 3 d convolutional networks
 
Semantic Concept Detection in Video Using Hybrid Model of CNN and SVM Classif...
Semantic Concept Detection in Video Using Hybrid Model of CNN and SVM Classif...Semantic Concept Detection in Video Using Hybrid Model of CNN and SVM Classif...
Semantic Concept Detection in Video Using Hybrid Model of CNN and SVM Classif...
 
Content-based Image Retrieval - Eva Mohedano - UPC Barcelona 2018
Content-based Image Retrieval - Eva Mohedano - UPC Barcelona 2018Content-based Image Retrieval - Eva Mohedano - UPC Barcelona 2018
Content-based Image Retrieval - Eva Mohedano - UPC Barcelona 2018
 
Transfer Learning and Domain Adaptation - Ramon Morros - UPC Barcelona 2018
Transfer Learning and Domain Adaptation - Ramon Morros - UPC Barcelona 2018Transfer Learning and Domain Adaptation - Ramon Morros - UPC Barcelona 2018
Transfer Learning and Domain Adaptation - Ramon Morros - UPC Barcelona 2018
 
Development of a Location Invariant Crack Detection and Localisation Model (L...
Development of a Location Invariant Crack Detection and Localisation Model (L...Development of a Location Invariant Crack Detection and Localisation Model (L...
Development of a Location Invariant Crack Detection and Localisation Model (L...
 
DeepVO - Towards Visual Odometry with Deep Learning
DeepVO - Towards Visual Odometry with Deep LearningDeepVO - Towards Visual Odometry with Deep Learning
DeepVO - Towards Visual Odometry with Deep Learning
 
Chapter 3 pc
Chapter 3 pcChapter 3 pc
Chapter 3 pc
 
50120130406014
5012013040601450120130406014
50120130406014
 
HalifaxNGGs
HalifaxNGGsHalifaxNGGs
HalifaxNGGs
 
Learning RGB-D Salient Object Detection using background enclosure, depth con...
Learning RGB-D Salient Object Detection using background enclosure, depth con...Learning RGB-D Salient Object Detection using background enclosure, depth con...
Learning RGB-D Salient Object Detection using background enclosure, depth con...
 
Object Detection with Computer Vision
Object Detection with Computer VisionObject Detection with Computer Vision
Object Detection with Computer Vision
 
Target Detection Using Multi Resolution Analysis for Camouflaged Images
Target Detection Using Multi Resolution Analysis for Camouflaged Images Target Detection Using Multi Resolution Analysis for Camouflaged Images
Target Detection Using Multi Resolution Analysis for Camouflaged Images
 
Scene understanding
Scene understandingScene understanding
Scene understanding
 
Introduction to deep learning based voice activity detection
Introduction to deep learning based voice activity detectionIntroduction to deep learning based voice activity detection
Introduction to deep learning based voice activity detection
 
Master's Thesis - Data Science - Presentation
Master's Thesis - Data Science - PresentationMaster's Thesis - Data Science - Presentation
Master's Thesis - Data Science - Presentation
 
Dimensionality reduction and visualization techniques for high-dimensional ge...
Dimensionality reduction and visualization techniques for high-dimensional ge...Dimensionality reduction and visualization techniques for high-dimensional ge...
Dimensionality reduction and visualization techniques for high-dimensional ge...
 

More from KotaSaisathwik

More from KotaSaisathwik (8)

ECE551 Term Project Template.pptx
ECE551 Term Project Template.pptxECE551 Term Project Template.pptx
ECE551 Term Project Template.pptx
 
Chapter 4 L7-9.pptx
Chapter 4 L7-9.pptxChapter 4 L7-9.pptx
Chapter 4 L7-9.pptx
 
Chapter 5 L10-13.pptx
Chapter 5 L10-13.pptxChapter 5 L10-13.pptx
Chapter 5 L10-13.pptx
 
Chapter 6 L14-16.pptx
Chapter 6 L14-16.pptxChapter 6 L14-16.pptx
Chapter 6 L14-16.pptx
 
Chapter 7 L17.pptx
Chapter 7 L17.pptxChapter 7 L17.pptx
Chapter 7 L17.pptx
 
Chapter 10 L18-20.pptx
Chapter 10 L18-20.pptxChapter 10 L18-20.pptx
Chapter 10 L18-20.pptx
 
dl-2.pdf
dl-2.pdfdl-2.pdf
dl-2.pdf
 
Chapter_7.pptx
Chapter_7.pptxChapter_7.pptx
Chapter_7.pptx
 

Recently uploaded

scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...HenryBriggs2
 
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARHAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARKOUSTAV SARKAR
 
Basic Electronics for diploma students as per technical education Kerala Syll...
Basic Electronics for diploma students as per technical education Kerala Syll...Basic Electronics for diploma students as per technical education Kerala Syll...
Basic Electronics for diploma students as per technical education Kerala Syll...ppkakm
 
Linux Systems Programming: Inter Process Communication (IPC) using Pipes
Linux Systems Programming: Inter Process Communication (IPC) using PipesLinux Systems Programming: Inter Process Communication (IPC) using Pipes
Linux Systems Programming: Inter Process Communication (IPC) using PipesRashidFaridChishti
 
Path loss model, OKUMURA Model, Hata Model
Path loss model, OKUMURA Model, Hata ModelPath loss model, OKUMURA Model, Hata Model
Path loss model, OKUMURA Model, Hata ModelDrAjayKumarYadav4
 
Electromagnetic relays used for power system .pptx
Electromagnetic relays used for power system .pptxElectromagnetic relays used for power system .pptx
Electromagnetic relays used for power system .pptxNANDHAKUMARA10
 
fitting shop and tools used in fitting shop .ppt
fitting shop and tools used in fitting shop .pptfitting shop and tools used in fitting shop .ppt
fitting shop and tools used in fitting shop .pptAfnanAhmad53
 
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...Amil baba
 
Memory Interfacing of 8086 with DMA 8257
Memory Interfacing of 8086 with DMA 8257Memory Interfacing of 8086 with DMA 8257
Memory Interfacing of 8086 with DMA 8257subhasishdas79
 
Online food ordering system project report.pdf
Online food ordering system project report.pdfOnline food ordering system project report.pdf
Online food ordering system project report.pdfKamal Acharya
 
8086 Microprocessor Architecture: 16-bit microprocessor
8086 Microprocessor Architecture: 16-bit microprocessor8086 Microprocessor Architecture: 16-bit microprocessor
8086 Microprocessor Architecture: 16-bit microprocessorAshwiniTodkar4
 
Hospital management system project report.pdf
Hospital management system project report.pdfHospital management system project report.pdf
Hospital management system project report.pdfKamal Acharya
 
Query optimization and processing for advanced database systems
Query optimization and processing for advanced database systemsQuery optimization and processing for advanced database systems
Query optimization and processing for advanced database systemsmeharikiros2
 
Post office management system project ..pdf
Post office management system project ..pdfPost office management system project ..pdf
Post office management system project ..pdfKamal Acharya
 
Introduction to Geographic Information Systems
Introduction to Geographic Information SystemsIntroduction to Geographic Information Systems
Introduction to Geographic Information SystemsAnge Felix NSANZIYERA
 
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdfAldoGarca30
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdfKamal Acharya
 
Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...
Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...
Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...ssuserdfc773
 
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxHOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxSCMS School of Architecture
 

Recently uploaded (20)

scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
 
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARHAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
 
Basic Electronics for diploma students as per technical education Kerala Syll...
Basic Electronics for diploma students as per technical education Kerala Syll...Basic Electronics for diploma students as per technical education Kerala Syll...
Basic Electronics for diploma students as per technical education Kerala Syll...
 
Linux Systems Programming: Inter Process Communication (IPC) using Pipes
Linux Systems Programming: Inter Process Communication (IPC) using PipesLinux Systems Programming: Inter Process Communication (IPC) using Pipes
Linux Systems Programming: Inter Process Communication (IPC) using Pipes
 
Path loss model, OKUMURA Model, Hata Model
Path loss model, OKUMURA Model, Hata ModelPath loss model, OKUMURA Model, Hata Model
Path loss model, OKUMURA Model, Hata Model
 
Electromagnetic relays used for power system .pptx
Electromagnetic relays used for power system .pptxElectromagnetic relays used for power system .pptx
Electromagnetic relays used for power system .pptx
 
fitting shop and tools used in fitting shop .ppt
fitting shop and tools used in fitting shop .pptfitting shop and tools used in fitting shop .ppt
fitting shop and tools used in fitting shop .ppt
 
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
 
Memory Interfacing of 8086 with DMA 8257
Memory Interfacing of 8086 with DMA 8257Memory Interfacing of 8086 with DMA 8257
Memory Interfacing of 8086 with DMA 8257
 
Online food ordering system project report.pdf
Online food ordering system project report.pdfOnline food ordering system project report.pdf
Online food ordering system project report.pdf
 
8086 Microprocessor Architecture: 16-bit microprocessor
8086 Microprocessor Architecture: 16-bit microprocessor8086 Microprocessor Architecture: 16-bit microprocessor
8086 Microprocessor Architecture: 16-bit microprocessor
 
Hospital management system project report.pdf
Hospital management system project report.pdfHospital management system project report.pdf
Hospital management system project report.pdf
 
Query optimization and processing for advanced database systems
Query optimization and processing for advanced database systemsQuery optimization and processing for advanced database systems
Query optimization and processing for advanced database systems
 
Signal Processing and Linear System Analysis
Signal Processing and Linear System AnalysisSignal Processing and Linear System Analysis
Signal Processing and Linear System Analysis
 
Post office management system project ..pdf
Post office management system project ..pdfPost office management system project ..pdf
Post office management system project ..pdf
 
Introduction to Geographic Information Systems
Introduction to Geographic Information SystemsIntroduction to Geographic Information Systems
Introduction to Geographic Information Systems
 
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdf
 
Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...
Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...
Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...
 
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxHOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
 

dlc-10.1.pdf

  • 1. Deep Learning 10.1 Inside DNNs Dr. Konda Reddy Mopuri kmopuri@iittp.ac.in Dept. of CSE, IIT Tirupati Dr. Konda Reddy Mopuri dlc-10.1/Inside DNNs 1
  • 2. 1 Understanding how the DNNs learn or what happens inside the deep architecture is not simple Dr. Konda Reddy Mopuri dlc-10.1/Inside DNNs 2
  • 3. 1 Understanding how the DNNs learn or what happens inside the deep architecture is not simple 2 Not many tools can help us analyse these complex architectures Dr. Konda Reddy Mopuri dlc-10.1/Inside DNNs 2
  • 4. 1 In case of CNNs, we can look at the parameters (e.g. filters as images) Dr. Konda Reddy Mopuri dlc-10.1/Inside DNNs 3
  • 5. 1 In case of CNNs, we can look at the parameters (e.g. filters as images) activation maps for the given input Dr. Konda Reddy Mopuri dlc-10.1/Inside DNNs 3
  • 6. 1 In case of CNNs, we can look at the parameters (e.g. filters as images) activation maps for the given input distribution of activations for a population of samples Dr. Konda Reddy Mopuri dlc-10.1/Inside DNNs 3
  • 7. 1 In case of CNNs, we can look at the parameters (e.g. filters as images) activation maps for the given input distribution of activations for a population of samples derivative of selected activations wrt a given input Dr. Konda Reddy Mopuri dlc-10.1/Inside DNNs 3
  • 8. 1 In case of CNNs, we can look at the parameters (e.g. filters as images) activation maps for the given input distribution of activations for a population of samples derivative of selected activations wrt a given input synthesize samples that can cause maximal activations at selected neurons Dr. Konda Reddy Mopuri dlc-10.1/Inside DNNs 3
  • 9. Visualize in case of simpler models 1 Visualize the weights via plotting Dr. Konda Reddy Mopuri dlc-10.1/Inside DNNs 4
  • 10. Visualize in case of simpler models 1 Visualize the weights via plotting 2 e.g. input for an MLP is 2D vector Dr. Konda Reddy Mopuri dlc-10.1/Inside DNNs 4
  • 11. Visualize in case of simpler models 1 Visualize the weights via plotting 2 e.g. input for an MLP is 2D vector 3 weights in the first hidden layer are lines, we can plot them Dr. Konda Reddy Mopuri dlc-10.1/Inside DNNs 4
  • 12. Visualize in case of simpler models 1 Visualize the weights via plotting 2 e.g. input for an MLP is 2D vector 3 weights in the first hidden layer are lines, we can plot them 4 observe these lines during the course of training Dr. Konda Reddy Mopuri dlc-10.1/Inside DNNs 4
  • 13. CNN filters 1 Similar visualization gets challenging on practical DNNs because of the high dimensional inputs Dr. Konda Reddy Mopuri dlc-10.1/Inside DNNs 5
  • 14. CNN filters 1 Similar visualization gets challenging on practical DNNs because of the high dimensional inputs 2 View the filters learned by CNNs as images Dr. Konda Reddy Mopuri dlc-10.1/Inside DNNs 5
  • 15. CNN filters 1 Similar visualization gets challenging on practical DNNs because of the high dimensional inputs 2 View the filters learned by CNNs as images 3 Appropriate at the first layer (since the filters will have less number of channels like actual images) Dr. Konda Reddy Mopuri dlc-10.1/Inside DNNs 5
  • 16. CNN filters 1 Similar visualization gets challenging on practical DNNs because of the high dimensional inputs 2 View the filters learned by CNNs as images 3 Appropriate at the first layer (since the filters will have less number of channels like actual images) 4 Later layers will have multiple channels and makes it difficult to visualize Dr. Konda Reddy Mopuri dlc-10.1/Inside DNNs 5
  • 17. CNN Filters (LeNet and AlexNet) Dr. Konda Reddy Mopuri dlc-10.1/Inside DNNs 6
  • 18. Visualize feature maps 1 Since CNNs maintain the 2D structure, we can visualize the feature/activation maps at any layer Dr. Konda Reddy Mopuri dlc-10.1/Inside DNNs 7
  • 19. Visualize feature maps 1 Since CNNs maintain the 2D structure, we can visualize the feature/activation maps at any layer 2 Since there may be a large number of channels, we may have to pick a subset of them Dr. Konda Reddy Mopuri dlc-10.1/Inside DNNs 7
  • 20. Visualize feature maps 1 Since CNNs maintain the 2D structure, we can visualize the feature/activation maps at any layer 2 Since there may be a large number of channels, we may have to pick a subset of them 3 Visualizing individual maps may not be very helpful Dr. Konda Reddy Mopuri dlc-10.1/Inside DNNs 7
  • 21. Visualize feature maps Figure credits: Shivang Shrivastav Dr. Konda Reddy Mopuri dlc-10.1/Inside DNNs 8
  • 22. Visualize feature maps 1 Although it is quite hard to precisely identify the role each filter, one may identify edge and some blob detectors. 2 As we go deeper in the network, the more difficult it gets to understand the role of filters Dr. Konda Reddy Mopuri dlc-10.1/Inside DNNs 9
  • 23. Visualize feature maps 1 Allows in particular to find units with a clear semantic/concept Ross Girshick et al. 2014 Dr. Konda Reddy Mopuri dlc-10.1/Inside DNNs 10
  • 24. Analyze the model behavior in the neighborhood of an input 1 We may estimate the importance of a portion of input via occlusion Dr. Konda Reddy Mopuri dlc-10.1/Inside DNNs 11
  • 25. Occlusion sensitivity Dr. Konda Reddy Mopuri dlc-10.1/Inside DNNs 12
  • 26. Occlusion sensitivity Dr. Konda Reddy Mopuri dlc-10.1/Inside DNNs 13
  • 27. Saliency maps 1 Highlight the parts of input that are influential for the output Dr. Konda Reddy Mopuri dlc-10.1/Inside DNNs 14
  • 28. Saliency maps 1 Highlight the parts of input that are influential for the output 2 Compute the derivative of the output wrt the input over a trained DNN model (Simonyan et al. 2013) ∇|xfc(x; w) Dr. Konda Reddy Mopuri dlc-10.1/Inside DNNs 14
  • 29. Saliency maps 1 Highlight the parts of input that are influential for the output 2 Compute the derivative of the output wrt the input over a trained DNN model (Simonyan et al. 2013) ∇|xfc(x; w) 3 input.requires_grad_() output = model(input) grad_input, = torch.autograd.grad(output[0, c], input) Dr. Konda Reddy Mopuri dlc-10.1/Inside DNNs 14
  • 30. Gradient as saliency Dr. Konda Reddy Mopuri dlc-10.1/Inside DNNs 15
  • 31. Smooth Grad 1 (Pixel level) Gradient is noisy Dr. Konda Reddy Mopuri dlc-10.1/Inside DNNs 16
  • 32. Smooth Grad 1 (Pixel level) Gradient is noisy 2 We can smooth the gradient by taking the mean gradient over (slightly) perturbed inputs (Smilkov et al. 2017) ˜ ∇|xfy(x; w) = 1 N N X n=1 ∇|xfy(x + n; w) where n ∼ N(0, σ2I) Dr. Konda Reddy Mopuri dlc-10.1/Inside DNNs 16
  • 33. Smooth Grad Dr. Konda Reddy Mopuri dlc-10.1/Inside DNNs 17
  • 34. Improvements to gradient based visualization 1 Deconvolution by Zeiler and Fergus 2 Guided Backpropagation by Springenberg et al. (2014) 3 Class Activation Maps ( Zhou et al. 2016) 4 Gradient-weighted Class Activation Mapping (Grad-CAM) by Selvaraju et al. (2016) 5 ... Dr. Konda Reddy Mopuri dlc-10.1/Inside DNNs 18
  • 35. References 1 Ross Girshick, Jeff Donahue, Trevor Darrell, Jitendra Malik; Rich Feature Hierarchies for Accurate Object Detection and Semantic Segmentation, Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2014, pp. 580-587 2 K. Simonyan, A. Vedaldi, and A. Zisserman. Deep inside convolutional networks: Visualising image classification models and saliency maps. CoRR, abs/1312.6034, 2013 3 D Smilkov, N. Thorat, B. Kim, F. Viegas, and M. Wattenberg. Smoothgrad: removing noise by adding noise. CoRR, abs/1706.03825, 2017. 4 M. D. Zeiler and R. Fergus. Visualizing and understanding convolutional networks. In European Conference on Computer Vision (ECCV), 2014 5 J. Springenberg, A. Dosovitskiy, T. Brox, and M. Riedmiller. Striving for simplicity: The all convolutional net. CoRR, abs/1412.6806, 2014 6 R. Selvaraju, M. Cogswell, A. Das, R. Vedantam, D. Parikh, and D. Batra. Grad-cam: Visual explanations from deep networks via gradient-based localization. CoRR, abs/1610.02391, 2016 7 B. Zhou, A. Khosla, A. Lapedriza, A. Oliva, and A. Torralba. Learning Deep Features for Discriminative Localization. CVPR’16 (arXiv:1512.04150, 2015). Dr. Konda Reddy Mopuri dlc-10.1/Inside DNNs 19