SlideShare una empresa de Scribd logo
1 de 59
Descargar para leer sin conexión
Modules &
Architectures
Yann LeCun
NYU - Courant Institute & Center for Data Science
Facebook AI Research
Deep Learning, NYU Spring 2021
Y. LeCun
Deep Learning: Assembling differentiable modules
Deep Learning Definition:
Assembling networks of differentiable
modules and training them with a gradient-
based optimization method.
Any graph of modules is fine
As long as there exist a partial order on the
modules, and we can backpropagate gradient
with respect to the relevant variables
If the graph has loops…
we need to “unroll” them.
Recurrent networks and bakprop through time
Y. LeCun
Simple Neural Net
Object-oriented version
Uses predefined nn.Linear class,
(which includes a bias vector)
Uses torch.relu function
State variables are temporary
Activation Functions
In PyTorch & how to use them
Y. LeCun
ReLU – nn.ReLU()
Y. LeCun
RReLU – nn.RReLU()
Y. LeCun
LeakyReLU – nn.LeakyReLU()
Y. LeCun
PReLU – nn.PReLU()
Y. LeCun
Softplus – nn.Softplus()
Y. LeCun
ELU – nn.ELU()
Y. LeCun
CELU – nn.CELU()
Barron (2017) Continuously differentiable exponential linear units
Y. LeCun
CELU – nn.CELU()
Y. LeCun
CELU – nn.CELU()
Y. LeCun
SELU – nn.SELU()
Y. LeCun
SELU – nn.SELU()
Klambauer, Unterthiner, Mayr, Hochreiter (2017) Self-normalizing neural networks
Y. LeCun
GELU – nn.GELU()
Y. LeCun
ReLU6 – nn.ReLU6()
Y. LeCun
Sigmoid – nn.Sigmoid()
Y. LeCun
Tanh – nn.Tanh()
Y. LeCun
Softsign – nn.Softsign()
Y. LeCun
Hardtanh – nn.Hardtanh()
Y. LeCun
Threshold – nn.Threshold()
Y. LeCun
Tanhshrink – nn.Tanhshrink()
Y. LeCun
Softshrink – nn.Softshrink()
Y. LeCun
Hardshrink – nn.Hardshrink()
Y. LeCun
LogSigmoid – nn.LogSigmoid()
Y. LeCun
Softmin – nn.Softmin()
Y. LeCun
Softmax – nn.Softmax()
Y. LeCun
LogSoftmax – nn.LogSoftmax()
Cost Functions
In PyTorch & how to use them
Y. LeCun
MSE – nn.MSELoss()
Y. LeCun
L1 – nn.L1Loss()
Y. LeCun
nn.SmoothL1Loss()
Y. LeCun
NLL – nn.NLLLoss()
Y. LeCun
CE – nn.CrossEntropyLoss()
Y. LeCun
CE – nn.CrossEntropyLoss()
Y. LeCun
nn.AdaptiveLogSoftmaxWithLoss()
Y. LeCun
KLDiv – nn.KLDivLoss()
Y. LeCun
Poisson – nn.PoissonNLLLoss()
Y. LeCun
BCE – nn.BCELoss()
Y. LeCun
BCE – nn.BCELoss()
Y. LeCun
BCE – nn.BCEWithLogitsLoss()
Y. LeCun
BCE – nn.BCEWithLogitsLoss()
Y. LeCun
Ranking – nn.MarginRankingLoss()
Y. LeCun
nn.TripletMarginLoss()
Y. LeCun
nn.TripletMarginLoss()
Y. LeCun
nn.SoftMarginLoss()
Y. LeCun
nn.MultiLabelMarginLoss()
Y. LeCun
nn.MultiLabelSoftMarginLoss()
Y. LeCun
nn.MultiMarginLoss()
Y. LeCun
nn.HingeEmbeddingLoss()
Y. LeCun
nn.CosineEmbeddingLoss()
Y. LeCun
CTC – nn.CTCLoss()
Architectures
Arranging modules
Y. LeCun
Multiplicative Modules
Quadratic layer, product units, Sigma-Pi units
Attention module
softmax
+
Y. LeCun
Mixture of Experts
Attention module “Switches” expert networks
softmax
+
Expert2
Expert1
Gater
Y. LeCun
Parameter transformations
When the parameter vector is the output of a function
G(x,w)
y
x y
C(y,y)
H(u)
u w
Y. LeCun
Simple parameter transform: weight sharing
Function H(u) replicates one component of u into multiple
components of w
H is like a “Y” branch.
Gradients are summed in the backprop
The gradients w.r.t. shared parameters are added.
G(x,w)
y
x y
C(y,y)
H(u)
u w
Y. LeCun
Shared Weights for Motif Detection
Detecting motifs anywhere on an input
w G(x,w) G(x,w) G(x,w) G(x,w) G(x,w)
MAX

Más contenido relacionado

Similar a Modules & architectures

Multi-Layer Perceptrons
Multi-Layer PerceptronsMulti-Layer Perceptrons
Multi-Layer Perceptrons
ESCOM
 
Neural Network Dynamical Systems
Neural Network Dynamical Systems Neural Network Dynamical Systems
Neural Network Dynamical Systems
M Reza Rahmati
 

Similar a Modules & architectures (20)

RNN and sequence-to-sequence processing
RNN and sequence-to-sequence processingRNN and sequence-to-sequence processing
RNN and sequence-to-sequence processing
 
Scene understanding
Scene understandingScene understanding
Scene understanding
 
Finite Element Analysis Lecture Notes Anna University 2013 Regulation
Finite Element Analysis Lecture Notes Anna University 2013 Regulation Finite Element Analysis Lecture Notes Anna University 2013 Regulation
Finite Element Analysis Lecture Notes Anna University 2013 Regulation
 
Single Machine Power Network Load Frequency Control Using T-S Fuzzy Based Rob...
Single Machine Power Network Load Frequency Control Using T-S Fuzzy Based Rob...Single Machine Power Network Load Frequency Control Using T-S Fuzzy Based Rob...
Single Machine Power Network Load Frequency Control Using T-S Fuzzy Based Rob...
 
Dsp 2marks
Dsp 2marksDsp 2marks
Dsp 2marks
 
Convolutional neural networks
Convolutional neural  networksConvolutional neural  networks
Convolutional neural networks
 
A fuzzy logic controllerfora two link functional manipulator
A fuzzy logic controllerfora two link functional manipulatorA fuzzy logic controllerfora two link functional manipulator
A fuzzy logic controllerfora two link functional manipulator
 
Recurrent and Recursive Nets (part 2)
Recurrent and Recursive Nets (part 2)Recurrent and Recursive Nets (part 2)
Recurrent and Recursive Nets (part 2)
 
Termpaper ai
Termpaper aiTermpaper ai
Termpaper ai
 
Finite Element Analysis of Truss Structures
Finite Element Analysis of Truss StructuresFinite Element Analysis of Truss Structures
Finite Element Analysis of Truss Structures
 
Multi-Layer Perceptrons
Multi-Layer PerceptronsMulti-Layer Perceptrons
Multi-Layer Perceptrons
 
Basic openfoa mtutorialsguide
Basic openfoa mtutorialsguideBasic openfoa mtutorialsguide
Basic openfoa mtutorialsguide
 
solver (1)
solver (1)solver (1)
solver (1)
 
lec26.pptx
lec26.pptxlec26.pptx
lec26.pptx
 
Ase02.ppt
Ase02.pptAse02.ppt
Ase02.ppt
 
Ppt chapter12
Ppt chapter12Ppt chapter12
Ppt chapter12
 
Deep Learning: Application & Opportunity
Deep Learning: Application & OpportunityDeep Learning: Application & Opportunity
Deep Learning: Application & Opportunity
 
Echo state networks and locomotion patterns
Echo state networks and locomotion patternsEcho state networks and locomotion patterns
Echo state networks and locomotion patterns
 
ICLR 2018
ICLR 2018ICLR 2018
ICLR 2018
 
Neural Network Dynamical Systems
Neural Network Dynamical Systems Neural Network Dynamical Systems
Neural Network Dynamical Systems
 

Último

1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
AnaAcapella
 

Último (20)

This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptx
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
Magic bus Group work1and 2 (Team 3).pptx
Magic bus Group work1and 2 (Team 3).pptxMagic bus Group work1and 2 (Team 3).pptx
Magic bus Group work1and 2 (Team 3).pptx
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Asian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptxAsian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptx
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Third Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptxThird Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptx
 

Modules & architectures